Skip to content

Commit

Permalink
Added point number to -l output
Browse files Browse the repository at this point in the history
  • Loading branch information
circulosmeos committed Sep 3, 2019
1 parent f5d684e commit fb86f5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Copy gztool.c to the directory where you compiled zlib, and do:
Usage
=====

gztool (v0.7)
gztool (v0.7.2)
GZIP files indexer and data retriever.
Create small indexes for gzipped files and use them
for quick and random positioned data extraction.
Expand Down Expand Up @@ -199,7 +199,7 @@ Examples of use
Size of uncompressed file: 147773440 Bytes
List of points:
@ compressed/uncompressed byte (index data size in Bytes @window's beginning at index file), ...
@ 10 / 0 ( 0 @56 ), @ 3059779 / 10495261 ( 13127 @80 ), @ 6418423 / 21210594 ( 6818 @13231 ), @ 9534259 / 31720206 ( 7238 @20073 )...
#1: @ 10 / 0 ( 0 @56 ), #2: @ 3059779 / 10495261 ( 13127 @80 ), #3: @ 6418423 / 21210594 ( 6818 @13231 ), #4: @ 9534259 / 31720206 ( 7238 @20073 )...
...

If `gztool` finds the gzip file companion of the index file, some statistics are shown, like the index/gzip size ratio, or the ratio of compression of the gzip file.
Expand All @@ -210,7 +210,7 @@ Also, if the gzip is complete, the size of the uncompressed data is shown. This

$ gztool -l gzip_filename -I index_filename

In this latter case only a pair of index+gzip filenames can be indicated on each use.
In this latter case only a pair of index+gzip filenames can be indicated with each use.

Index file format
=================
Expand Down Expand Up @@ -262,7 +262,7 @@ Other tools which try to provide random access to gzipped files
Version
=======

This version is **v0.7**.
This version is **v0.7.2**.

Please, read the *Disclaimer*. This is still a beta release. In case of any errors, please open an *Issue*.

Expand Down
10 changes: 5 additions & 5 deletions gztool.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

#define local static

#define GZTOOL_VERSION "0.7.1"
#define GZTOOL_VERSION "0.7.2"

#define SPAN 10485760L /* desired distance between access points */
#define WINSIZE 32768U /* sliding window size */
Expand Down Expand Up @@ -2330,10 +2330,10 @@ local int action_list_info( unsigned char *file_name, unsigned char *input_gzip_
if ( list_verbosity == VERBOSITY_MANIAC )
fprintf( stdout, "Checking compressed windows...\n\t" );
}
for (j=0; j<index->have; j++) {
for ( j=0; j<index->have; j++ ) {
if ( list_verbosity == VERBOSITY_EXCESSIVE &&
verbosity_level > VERBOSITY_NONE )
fprintf( stdout, "@ %ld / %ld ( %d @%ld ), ", index->list[j].in, index->list[j].out, index->list[j].window_size, index->list[j].window_beginning );
fprintf( stdout, "#%ld: @ %ld / %ld ( %d @%ld ), ", j +1, index->list[j].in, index->list[j].out, index->list[j].window_size, index->list[j].window_beginning );
if ( list_verbosity == VERBOSITY_MANIAC ) {
uint64_t local_window_size = index->list[j].window_size;
if ( local_window_size > 0 ) {
Expand All @@ -2350,8 +2350,8 @@ local int action_list_info( unsigned char *file_name, unsigned char *input_gzip_
if ( verbosity_level > VERBOSITY_NONE ) {
comp_win_counter += index->list[j].window_size;
uncomp_win_counter += local_window_size;
fprintf( stdout, "@ %ld / %ld ( %d/%ld %.2f%% ), ",
index->list[j].in, index->list[j].out, index->list[j].window_size,
fprintf( stdout, "#%ld: @ %ld / %ld ( %d/%ld %.2f%% ), ",
j +1, index->list[j].in, index->list[j].out, index->list[j].window_size,
local_window_size, ((local_window_size>0)?(100.0 - (double)(index->list[j].window_size) / (double)local_window_size * 100.0):0.0) );
}
}
Expand Down

0 comments on commit fb86f5d

Please sign in to comment.