source: thirdparty/blosc/blosclz.h @ 00587dc

Revision 00587dc, 1.9 KB checked in by Hal Finkel <hfinkel@…>, 9 years ago (diff)

Initial Commit (gio-base-20150317)

  • Property mode set to 100644
Line 
1/*********************************************************************
2  Blosc - Blocked Suffling and Compression Library
3
4  Author: Francesc Alted <[email protected]>
5
6  See LICENSES/BLOSC.txt for details about copyright and rights to use.
7**********************************************************************/
8
9/*********************************************************************
10  The code in this file is heavily based on FastLZ, a lightning-fast
11  lossless compression library.  See LICENSES/FASTLZ.txt for details
12  about copyright and rights to use.
13**********************************************************************/
14
15
16#ifndef BLOSCLZ_H
17#define BLOSCLZ_H
18
19#if defined (__cplusplus)
20extern "C" {
21#endif
22
23/**
24  Compress a block of data in the input buffer and returns the size of
25  compressed block. The size of input buffer is specified by
26  length. The minimum input buffer size is 16.
27
28  The output buffer must be at least 5% larger than the input buffer
29  and can not be smaller than 66 bytes.
30
31  If the input is not compressible, or output does not fit in maxout
32  bytes, the return value will be 0 and you will have to discard the
33  output buffer.
34
35  The input buffer and the output buffer can not overlap.
36*/
37
38int blosclz_compress(int opt_level, const void* input, int length,
39                     void* output, int maxout);
40
41/**
42  Decompress a block of compressed data and returns the size of the
43  decompressed block. If error occurs, e.g. the compressed data is
44  corrupted or the output buffer is not large enough, then 0 (zero)
45  will be returned instead.
46
47  The input buffer and the output buffer can not overlap.
48
49  Decompression is memory safe and guaranteed not to write the output buffer
50  more than what is specified in maxout.
51 */
52
53int blosclz_decompress(const void* input, int length, void* output, int maxout);
54
55#if defined (__cplusplus)
56}
57#endif
58
59#endif /* BLOSCLZ_H */
Note: See TracBrowser for help on using the repository browser.