30 #if !defined (SQUASH_H_INSIDE) && !defined (SQUASH_COMPILATION)
31 #error "Only <squash/squash.h> can be included directly."
50 SquashOptions* options);
54 SquashOptions* options);
64 SquashOptions* options);
67 SquashOptions* options);
70 size_t* decompressed_length,
71 uint8_t decompressed[SQUASH_ARRAY_PARAM(*decompressed_length)]);
73 size_t uncompressed_length,
74 const uint8_t uncompressed[SQUASH_ARRAY_PARAM(uncompressed_length)]);
94 SquashOptions* options);
100 SquashOptions* options);
SQUASH_API SquashStatus squash_splice_codec_with_options(SquashCodec *codec, SquashStreamType stream_type, FILE *fp_out, FILE *fp_in, size_t length, SquashOptions *options)
compress or decompress the contents of one file to another
SQUASH_API bool squash_file_eof(SquashFile *file)
Determine whether the file has reached the end of file.
SQUASH_BEGIN_DECLS SQUASH_API SquashFile * squash_file_open(const char *codec, const char *filename, const char *mode,...)
Open a file.
SQUASH_API SquashStatus squash_file_read(SquashFile *file, size_t *decompressed_length, uint8_t decompressed[SQUASH_ARRAY_PARAM(*decompressed_length)])
Read from a compressed file.
SQUASH_API SquashStatus squash_file_flush(SquashFile *file)
immediately write any buffered data to a file
SQUASH_API SquashFile * squash_file_open_codec_with_options(SquashCodec *codec, const char *filename, const char *mode, SquashOptions *options)
Open a file using a codec instance with the specified options.
SQUASH_API SquashFile * squash_file_open_with_options(const char *codec, const char *filename, const char *mode, SquashOptions *options)
Open a file with the specified options.
SquashStatus
Status codes.
SQUASH_API SquashFile * squash_file_steal_codec(SquashCodec *codec, FILE *fp,...)
Open an existing stdio file using a codec instance.
SQUASH_API SquashStatus squash_file_close(SquashFile *file)
Close a file.
SQUASH_API SquashStatus squash_splice_with_options(const char *codec, SquashStreamType stream_type, FILE *fp_out, FILE *fp_in, size_t length, SquashOptions *options)
compress or decompress the contents of one file to another
SQUASH_API SquashFile * squash_file_steal_codec_with_options(SquashCodec *codec, FILE *fp, SquashOptions *options)
Open an existing stdio file using a codec instance with the specified options.
SQUASH_API SquashStatus squash_splice(const char *codec, SquashStreamType stream_type, FILE *fp_out, FILE *fp_in, size_t length,...)
compress or decompress the contents of one file to another
SQUASH_API SquashStatus squash_file_free(SquashFile *file, FILE **fp)
Free a file.
SQUASH_API SquashFile * squash_file_steal_with_options(const char *codec, FILE *fp, SquashOptions *options)
Open an existing stdio file with the specified options.
SQUASH_API SquashFile * squash_file_open_codec(SquashCodec *codec, const char *filename, const char *mode,...)
Open a file using a codec instance.
SQUASH_API SquashStatus squash_splice_codec(SquashCodec *codec, SquashStreamType stream_type, FILE *fp_out, FILE *fp_in, size_t length,...)
compress or decompress the contents of one file to another
SquashStreamType
Stream type.
SQUASH_API SquashFile * squash_file_steal(const char *codec, FILE *fp,...)
Open an existing stdio file.
SQUASH_API SquashStatus squash_file_write(SquashFile *file, size_t uncompressed_length, const uint8_t uncompressed[SQUASH_ARRAY_PARAM(uncompressed_length)])
Write data to a compressed file.