If you make an object foo which uses blocks of memory (e.g. vector, matrix, histogram) you can provide functions for reading and writing those blocks,
int gsl_foo_fread (FILE * stream, gsl_foo * v); int gsl_foo_fwrite (FILE * stream, const gsl_foo * v); int gsl_foo_fscanf (FILE * stream, gsl_foo * v); int gsl_foo_fprintf (FILE * stream, const gsl_foo * v, const char *format);
Only dump out the blocks of memory, not any associated parameters such as lengths. The idea is for the user to build higher level input/output facilities using the functions the library provides. Use the functions
int gsl_block_fread (FILE * stream, gsl_block * b); int gsl_block_fwrite (FILE * stream, const gsl_block * b); int gsl_block_fscanf (FILE * stream, gsl_block * b); int gsl_block_fprintf (FILE * stream, const gsl_block * b, const char *format);
or
int gsl_block_raw_fread (FILE * stream, double * b, size_t n, size_t stride); int gsl_block_raw_fwrite (FILE * stream, const double * b, size_t n, size_t stri de); int gsl_block_raw_fscanf (FILE * stream, double * b, size_t n, size_t stride); int gsl_block_raw_fprintf (FILE * stream, const double * b, size_t n, size_t str ide, const char *format);
to do the actual reading and writing.