source: thirdparty/blosc/blosclz.h @ 981e22c

Revision 981e22c, 2.1 KB checked in by Hal Finkel <hfinkel@…>, 8 years ago (diff)

Upgrade to latest blosc library

blosc git: e394f327ccc78319d90a06af0b88bce07034b8dd

  • Property mode set to 100644
RevLine 
[00587dc]1/*********************************************************************
[981e22c]2  Blosc - Blocked Shuffling and Compression Library
[00587dc]3
[981e22c]4  Author: Francesc Alted <[email protected]>
[00587dc]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
[981e22c]35  The acceleration parameter is related with the frequency for
36  updating the internal hash.  An acceleration of 1 means that the
37  internal hash is updated at full rate.  A value < 1 is not allowed
38  and will be silently set to 1.
39
[00587dc]40  The input buffer and the output buffer can not overlap.
41*/
42
[981e22c]43int blosclz_compress(const int opt_level, const void* input, int length,
44                     void* output, int maxout, int accel);
[00587dc]45
46/**
47  Decompress a block of compressed data and returns the size of the
48  decompressed block. If error occurs, e.g. the compressed data is
49  corrupted or the output buffer is not large enough, then 0 (zero)
50  will be returned instead.
51
52  The input buffer and the output buffer can not overlap.
53
54  Decompression is memory safe and guaranteed not to write the output buffer
55  more than what is specified in maxout.
56 */
57
58int blosclz_decompress(const void* input, int length, void* output, int maxout);
59
60#if defined (__cplusplus)
61}
62#endif
63
64#endif /* BLOSCLZ_H */
Note: See TracBrowser for help on using the repository browser.