https://code.google.com/p/lz4/issues/detail?id=155
This is experimental implementation. Just a proof of concept.
It works Linux and Windows.
# Build
To build experimental version, define 'LZ4IO_ENABLE_SPARSE_FILE' like the following command :
make lz4programs 'CFLAGS=-O3 -DLZ4IO_ENABLE_SPARSE_FILE=1'
./programs/lz4 -h
You will see "EXPERIMENTAL_SPARSE_FILE" as lz4 revision :
"*** LZ4 command line interface 64-bits EXPERIMENTAL_SPARSE_FILE, by Yann Collet (...) ***"
# Experiment
This experimental version adds option "-x" for sparse file for decompression.
You can use this option like this :
./programs/lz4 -9 -f my-file
./programs/lz4 -d -f -x my-file.lz4 my-file.lz4.out
cmp my-file my-file.lz4.out
Since MSVC fseek()'s SEEK_CUR mode has 2GiB barrier, our fseek() calling in program/lz4io.c/selectDecoder() will fail for large (>2GiB) .lz4 file.
This commit just replace fseek with _fseeki64 by macro. Second argument is automatically casted to __int64 (signed 64bit integer). Other things are completely same.
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