kusano 7d535a
/*
kusano 7d535a
  LZ4io.h - LZ4 File/Stream Interface
kusano 7d535a
  Copyright (C) Yann Collet 2011-2015
kusano 7d535a
  GPL v2 License
kusano 7d535a
kusano 7d535a
  This program is free software; you can redistribute it and/or modify
kusano 7d535a
  it under the terms of the GNU General Public License as published by
kusano 7d535a
  the Free Software Foundation; either version 2 of the License, or
kusano 7d535a
  (at your option) any later version.
kusano 7d535a
kusano 7d535a
  This program is distributed in the hope that it will be useful,
kusano 7d535a
  but WITHOUT ANY WARRANTY; without even the implied warranty of
kusano 7d535a
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
kusano 7d535a
  GNU General Public License for more details.
kusano 7d535a
kusano 7d535a
  You should have received a copy of the GNU General Public License along
kusano 7d535a
  with this program; if not, write to the Free Software Foundation, Inc.,
kusano 7d535a
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
kusano 7d535a
kusano 7d535a
  You can contact the author at :
kusano 7d535a
  - LZ4 source repository : https://github.com/Cyan4973/lz4
kusano 7d535a
  - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
kusano 7d535a
*/
kusano 7d535a
/*
kusano 7d535a
  Note : this is stand-alone program.
kusano 7d535a
  It is not part of LZ4 compression library, it is a user code of the LZ4 library.
kusano 7d535a
  - The license of LZ4 library is BSD.
kusano 7d535a
  - The license of xxHash library is BSD.
kusano 7d535a
  - The license of this source file is GPLv2.
kusano 7d535a
*/
kusano 7d535a
kusano 7d535a
#pragma once
kusano 7d535a
kusano 7d535a
/* ************************************************** */
kusano 7d535a
/* Special input/output values                        */
kusano 7d535a
/* ************************************************** */
kusano 7d535a
#define NULL_OUTPUT "null"
kusano 7d535a
static char const stdinmark[] = "stdin";
kusano 7d535a
static char const stdoutmark[] = "stdout";
kusano 7d535a
#ifdef _WIN32
kusano 7d535a
static char const nulmark[] = "nul";
kusano 7d535a
#else
kusano 7d535a
static char const nulmark[] = "/dev/null";
kusano 7d535a
#endif
kusano 7d535a
kusano 7d535a
kusano 7d535a
/* ************************************************** */
kusano 7d535a
/* ****************** Functions ********************* */
kusano 7d535a
/* ************************************************** */
kusano 7d535a
kusano 7d535a
int LZ4IO_compressFilename  (const char* input_filename, const char* output_filename, int compressionlevel);
kusano 7d535a
int LZ4IO_decompressFilename(const char* input_filename, const char* output_filename);
kusano 7d535a
kusano 7d535a
kusano 7d535a
int LZ4IO_compressMultipleFilenames(const char** inFileNamesTable, int ifntSize, const char* suffix, int compressionlevel);
kusano 7d535a
int LZ4IO_decompressMultipleFilenames(const char** inFileNamesTable, int ifntSize, const char* suffix);
kusano 7d535a
kusano 7d535a
/* ************************************************** */
kusano 7d535a
/* ****************** Parameters ******************** */
kusano 7d535a
/* ************************************************** */
kusano 7d535a
kusano 7d535a
/* Default setting : overwrite = 1;
kusano 7d535a
   return : overwrite mode (0/1) */
kusano 7d535a
int LZ4IO_setOverwrite(int yes);
kusano 7d535a
kusano 7d535a
/* blockSizeID : valid values : 4-5-6-7
kusano 7d535a
   return : -1 if error, blockSize if OK */
kusano 7d535a
int LZ4IO_setBlockSizeID(int blockSizeID);
kusano 7d535a
kusano 7d535a
/* Default setting : independent blocks */
kusano 7d535a
typedef enum { LZ4IO_blockLinked=0, LZ4IO_blockIndependent} LZ4IO_blockMode_t;
kusano 7d535a
int LZ4IO_setBlockMode(LZ4IO_blockMode_t blockMode);
kusano 7d535a
kusano 7d535a
/* Default setting : no block checksum */
kusano 7d535a
int LZ4IO_setBlockChecksumMode(int xxhash);
kusano 7d535a
kusano 7d535a
/* Default setting : stream checksum enabled */
kusano 7d535a
int LZ4IO_setStreamChecksumMode(int xxhash);
kusano 7d535a
kusano 7d535a
/* Default setting : 0 (no notification) */
kusano 7d535a
int LZ4IO_setNotificationLevel(int level);
kusano 7d535a
kusano 7d535a
/* Default setting : 0 (disabled) */
kusano 7d535a
int LZ4IO_setSparseFile(int enable);
kusano 7d535a
kusano 7d535a
/* Default setting : 0 (disabled) */
kusano 7d535a
int LZ4IO_setContentSize(int enable);