Mistake on this page?
Report an issue in GitHub or email us
pithy.h
1 //
2 // pithy.h
3 // http://github.com/johnezang/pithy
4 // Licensed under the terms of the BSD License, as specified below.
5 //
6 
7 /*
8  Copyright (c) 2011, John Engelhart
9 
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14 
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17 
18  * Redistributions in binary form must reproduce the above copyright
19  notice, this list of conditions and the following disclaimer in the
20  documentation and/or other materials provided with the distribution.
21 
22  * Neither the name of the Zang Industries nor the names of its
23  contributors may be used to endorse or promote products derived from
24  this software without specific prior written permission.
25 
26  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
32  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */
38 
39 #include <stdint.h>
40 #include <stddef.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #ifndef _PITHY_H_
47 #define _PITHY_H_
48 
49 // compressionLevel >= 0 && compressionLevel <= 9. Values out side this range will be clamped to this range.
50 size_t pithy_Compress (const char *uncompressed, size_t uncompressedLength, char *compressedOut,
51  size_t compressedOutLength, int compressionLevel);
52 int pithy_Decompress(const char *compressed, size_t compressedLength, char *decompressedOut,
53  size_t decompressedOutLength);
54 
55 size_t pithy_MaxCompressedLength(size_t inputLength);
56 int pithy_GetDecompressedLength(const char *compressed, size_t compressedLength,
57  size_t *decompressedOutLengthResult);
58 
59 #endif // _PITHY_H_
60 
61 #ifdef __cplusplus
62 } // extern "C"
63 #endif
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.