summaryrefslogtreecommitdiffstats
path: root/programs/lz4io.h
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2014-02-04 14:11:10 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2014-02-04 14:11:10 (GMT)
commit69dc85b8abe78246bea91a5ba1205e4c07b96a97 (patch)
tree0ed0250f8284861b90c2781aaa76172ebf97b6fd /programs/lz4io.h
parent96a60a52eb3e7d7a4785ad1dfc4e0abe3d0e10a1 (diff)
downloadlz4-69dc85b8abe78246bea91a5ba1205e4c07b96a97.zip
lz4-69dc85b8abe78246bea91a5ba1205e4c07b96a97.tar.gz
lz4-69dc85b8abe78246bea91a5ba1205e4c07b96a97.tar.bz2
Large decompression speed improvement for GCC 32-bits. Thanks to Valery Croizier !
LZ4HC : Compression Level is now a programmable parameter (CLI from 4 to 9) Separated IO routines from command line (lz4io.c) Version number into lz4.h (suggested by Francesc Alted) git-svn-id: https://lz4.googlecode.com/svn/trunk@113 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'programs/lz4io.h')
-rw-r--r--programs/lz4io.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/programs/lz4io.h b/programs/lz4io.h
new file mode 100644
index 0000000..cb35ec0
--- /dev/null
+++ b/programs/lz4io.h
@@ -0,0 +1,77 @@
+/*
+ LZ4io.h - LZ4 File/Stream Interface
+ Copyright (C) Yann Collet 2011-2013
+ GPL v2 License
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ You can contact the author at :
+ - LZ4 source repository : http://code.google.com/p/lz4/
+ - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
+*/
+/*
+ Note : this is stand-alone program.
+ It is not part of LZ4 compression library, it is a user code of the LZ4 library.
+ - The license of LZ4 library is BSD.
+ - The license of xxHash library is BSD.
+ - The license of this source file is GPLv2.
+*/
+
+
+/* ************************************************** */
+/* Special input/output values */
+/* ************************************************** */
+#define NULL_OUTPUT "null"
+static char stdinmark[] = "stdin";
+static char stdoutmark[] = "stdout";
+#ifdef _WIN32
+static char nulmark[] = "nul";
+#else
+static char nulmark[] = "/dev/null";
+#endif
+
+
+/* ************************************************** */
+/* ****************** Functions ********************* */
+/* ************************************************** */
+
+int LZ4IO_compressFilename (char* input_filename, char* output_filename, int compressionlevel);
+int LZ4IO_decompressFilename(char* input_filename, char* output_filename);
+
+
+/* ************************************************** */
+/* ****************** Parameters ******************** */
+/* ************************************************** */
+
+/* Default setting : overwrite = 1;
+ return : overwrite mode (0/1) */
+int LZ4IO_setOverwrite(int yes);
+
+/* blockSizeID : valid values : 4-5-6-7
+ return : -1 if error, blockSize if OK */
+int LZ4IO_setBlockSizeID(int blockSizeID);
+
+/* Default setting : independent blocks */
+typedef enum { chainedBlocks, independentBlocks } blockMode_t;
+int LZ4IO_setBlockMode(blockMode_t blockMode);
+
+/* Default setting : no checksum */
+int LZ4IO_setBlockChecksumMode(int xxhash);
+
+/* Default setting : checksum enabled */
+int LZ4IO_setStreamChecksumMode(int xxhash);
+
+/* Default setting : 0 (no notification) */
+int LZ4IO_setNotificationLevel(int level);