summaryrefslogtreecommitdiffstats
path: root/programs/lz4cli.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-03-08 18:06:17 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2015-03-08 18:06:17 (GMT)
commite277511ab65ad2482fecf70b8ad3665a8caa200a (patch)
tree7d83d14a22f747ab66d37edf3f530ad19d960f07 /programs/lz4cli.c
parente1d9b593e197bbb7f03be38739015a4fa7976c26 (diff)
parentdcdd628d5ec8a78401dbe277151e7654e300eafc (diff)
downloadlz4-e277511ab65ad2482fecf70b8ad3665a8caa200a.zip
lz4-e277511ab65ad2482fecf70b8ad3665a8caa200a.tar.gz
lz4-e277511ab65ad2482fecf70b8ad3665a8caa200a.tar.bz2
Merge pull request #54 from t-mat/gc-issue/155
Gc issue/155
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r--programs/lz4cli.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index ef3ef65..0a4d71d 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -83,6 +83,11 @@
/*****************************
* Constants
******************************/
+#if defined(LZ4IO_ENABLE_SPARSE_FILE)
+# undef LZ4_VERSION
+# define LZ4_VERSION "EXPERIMENTAL_SPARSE_FILE"
+#endif
+
#define COMPRESSOR_NAME "LZ4 command line interface"
#ifndef LZ4_VERSION
# define LZ4_VERSION "r128"
@@ -187,6 +192,10 @@ static int usage_advanced(void)
DISPLAY( " -y : overwrite output without prompting \n");
DISPLAY( " -s : suppress warnings \n");
#endif /* ENABLE_LZ4C_LEGACY_OPTIONS */
+#if defined(LZ4IO_ENABLE_SPARSE_FILE)
+ DISPLAY( "Experimental : Sparse file\n");
+ DISPLAY( " -x : enable sparse file\n");
+#endif /* LZ4IO_ENABLE_SPARSE_FILE */
EXTENDED_HELP;
return 0;
}
@@ -279,6 +288,9 @@ int main(int argc, char** argv)
/* Init */
programName = argv[0];
LZ4IO_setOverwrite(0);
+#if defined(LZ4IO_ENABLE_SPARSE_FILE)
+ LZ4IO_setSparseFile(0);
+#endif /* LZ4IO_ENABLE_SPARSE_FILE */
blockSize = LZ4IO_setBlockSizeID(LZ4_BLOCKSIZEID_DEFAULT);
/* lz4cat predefined behavior */
@@ -415,6 +427,11 @@ int main(int argc, char** argv)
/* Pause at the end (hidden option) */
case 'p': main_pause=1; BMK_SetPause(); break;
+#if defined(LZ4IO_ENABLE_SPARSE_FILE)
+ /* Experimental : Enable sparse file */
+ case 'x': LZ4IO_setSparseFile(1); break;
+#endif /* LZ4IO_ENABLE_SPARSE_FILE */
+
/* Specific commands for customized versions */
EXTENDED_ARGUMENTS;