]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
made style changes, added description in man file
authorPaul Cruz <paulcruz74@fb.com>
Mon, 19 Jun 2017 16:55:55 +0000 (09:55 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Mon, 19 Jun 2017 16:55:55 +0000 (09:55 -0700)
programs/fileio.c
programs/zstd.1.md

index df492a9ef7f84cbc333e364ac53f0dcb8c596a0d..f46986d0aa428ea46a1073cfeaf17ab16603ba55 100644 (file)
@@ -929,12 +929,11 @@ static int getFileInfo(fileInfo_t* info, const char* inFileName){
                 /* skip the rest of the blocks in the frame */
                 {
                     int lastBlock = 0;
-                    size_t readBytes = 0;
                     do {
                         BYTE blockHeaderBuffer[3];
                         U32 blockHeader;
                         int blockSize;
-                        readBytes = fread(blockHeaderBuffer, 1, 3, srcFile);
+                        size_t readBytes = fread(blockHeaderBuffer, 1, 3, srcFile);
                         if (readBytes != 3) {
                             DISPLAY("There was a problem reading the block header\n");
                             detectError = 1;
@@ -984,8 +983,8 @@ static int getFileInfo(fileInfo_t* info, const char* inFileName){
                     break;
                 }
                 {
-                    long const frameSize = MEM_readLE32(frameSizeBuffer);
-                    int const ret = fseek(srcFile, frameSize, SEEK_CUR);
+                    U32 const frameSize = MEM_readLE32(frameSizeBuffer);
+                    int const ret = fseek(srcFile, (long)frameSize, SEEK_CUR);
                     if (ret != 0) {
                         DISPLAY("Error: could not find end of skippable frame\n");
                         detectError = 1;
index 2f5a6747ef63afb901944e4b3e273f84b50356a4..a5ae27cb7b653eaaf270019a7251a09267df3e86 100644 (file)
@@ -93,6 +93,10 @@ the last one takes effect.
 * `--train FILEs`:
     Use FILEs as a training set to create a dictionary.
     The training set should contain a lot of small files (> 100).
+* `-l`, `--list`:
+    Display information related to a zstd compressed file, such as size, ratio, and checksum.
+    Some of these fields may not be available.
+    This command can be augmented with the `-v` modifier. 
 
 ### Operation modifiers