]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.fastlz/native/lz4hc.h
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.fastlz / native / lz4hc.h
diff --git a/bundles/org.simantics.fastlz/native/lz4hc.h b/bundles/org.simantics.fastlz/native/lz4hc.h
new file mode 100644 (file)
index 0000000..cb74689
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+   LZ4 HC - High Compression Mode of LZ4\r
+   Header File\r
+   Copyright (C) 2011-2012, Yann Collet.\r
+   BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)\r
+\r
+   Redistribution and use in source and binary forms, with or without\r
+   modification, are permitted provided that the following conditions are\r
+   met:\r
+\r
+       * Redistributions of source code must retain the above copyright\r
+   notice, this list of conditions and the following disclaimer.\r
+       * Redistributions in binary form must reproduce the above\r
+   copyright notice, this list of conditions and the following disclaimer\r
+   in the documentation and/or other materials provided with the\r
+   distribution.\r
+\r
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+   You can contact the author at :\r
+   - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html\r
+   - LZ4 source repository : http://code.google.com/p/lz4/\r
+*/\r
+#pragma once\r
+\r
+\r
+#if defined (__cplusplus)\r
+extern "C" {\r
+#endif\r
+\r
+\r
+int LZ4_compressHC (const char* source, char* dest, int isize);\r
+\r
+/*\r
+LZ4_compressHC :\r
+       return : the number of bytes in compressed buffer dest\r
+       note : destination buffer must be already allocated. \r
+               To avoid any problem, size it to handle worst cases situations (input data not compressible)\r
+               Worst case size evaluation is provided by function LZ4_compressBound() (see "lz4.h")\r
+*/\r
+\r
+\r
+/* Note :\r
+Decompression functions are provided within regular LZ4 source code (see "lz4.h") (BSD license)\r
+*/\r
+\r
+\r
+#if defined (__cplusplus)\r
+}\r
+#endif\r