00001 /* 00002 FastLZ - lightning-fast lossless compression library 00003 00004 Copyright (C) 2007 Ariya Hidayat (ariya@kde.org) 00005 Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) 00006 Copyright (C) 2005 Ariya Hidayat (ariya@kde.org) 00007 00008 Permission is hereby granted, free of charge, to any person obtaining a copy 00009 of this software and associated documentation files (the "Software"), to deal 00010 in the Software without restriction, including without limitation the rights 00011 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00012 copies of the Software, and to permit persons to whom the Software is 00013 furnished to do so, subject to the following conditions: 00014 00015 The above copyright notice and this permission notice shall be included in 00016 all copies or substantial portions of the Software. 00017 00018 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00019 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00020 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00021 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00022 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00023 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00024 THE SOFTWARE. 00025 */ 00026 00027 #ifndef FASTLZ_H 00028 #define FASTLZ_H 00029 00030 #include <inttypes.h> 00031 00032 #define flzuint8 uint8_t 00033 #define flzuint16 uint16_t 00034 #define flzuint32 uint32_t 00035 00036 00037 #define FASTLZ_VERSION 0x000100 00038 00039 #define FASTLZ_VERSION_MAJOR 0 00040 #define FASTLZ_VERSION_MINOR 0 00041 #define FASTLZ_VERSION_REVISION 0 00042 00043 #define FASTLZ_VERSION_STRING "0.1.0" 00044 00045 #if defined (__cplusplus) 00046 extern "C" { 00047 #endif 00048 00063 int fastlz_compress(const void* input, int length, void* output); 00064 00077 int fastlz_decompress(const void* input, int length, void* output, int maxout); 00078 00101 int fastlz_compress_level(int level, const void* input, int length, void* output); 00102 00103 #if defined (__cplusplus) 00104 } 00105 #endif 00106 00107 #endif /* FASTLZ_H */