Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action create index for a gzip from STDIN not working #14

Closed
aitorarjona opened this issue Jul 19, 2022 · 1 comment
Closed

Action create index for a gzip from STDIN not working #14

aitorarjona opened this issue Jul 19, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@aitorarjona
Copy link

aitorarjona commented Jul 19, 2022

Hello, thanks for maintaining this amazing tool :)

I need to use the reading from stdin feature, but is not working anymore for version 1.5.0.
I tried for version 1.4.3 and is working fine.

Steps to reproduce:

$ git clone https://github.com/circulosmeos/gztool.git
$ git fetch
$ git checkout v1.5.0
$ automake --add-missing && autoreconf && ./configure && make check
$ cat tests/gplv3.txt.gz | ./gztool -I index.bin
ACTION: Create index for a gzip file

Processing STDIN ...
Processing index to 'index.bin'...
ERROR: Compressed data error in STDIN.
$ make clean
$ git checkout v1.4.3
$ automake --add-missing && autoreconf && ./configure && make check
$ cat tests/gplv3.txt.gz | ./gztool -I index.bin
ACTION: Create index for a gzip file

Index file 'index.bin' already exists and will be used.
Processing STDIN ...
Processing index to 'index.bin'...
$ ./gztool -ell index.bin
ACTION: Check & list info in index file

Checking index file 'index.bin' ...
	Size of index file (v1)  : 84.00 Bytes (84 Bytes)
	Number of index points   : 1
	Size of uncompressed file: 31.27 kiB (32024 Bytes)
	Number of lines          : 207
	Compression factor       : Not available
	List of points:
	#: @ compressed/uncompressed byte L#line_number (window data size in Bytes @window's beginning at index file), ...
#1: @ 20 / 0 L1 ( 0 @60 ), 

1 files processed

Thank you!

@circulosmeos
Copy link
Owner

Hi @aitorarjona ,

Great thanks for your feedback and your kind words ! 😊

You're right, v1.5.0 fails in that case:
I think the process is correctly done, but gztool fails to display the correct "ok" message when reaching the end of the file.

I've just released v1.5.1 which reverts v1.5.0's STDIN changes, so now everything should run as smoothly as before.
v1.5.0 STDIN changes are little noticeable (only when tailing small inputs), and if I find spare time and a way to patch this incorrect behaviour I'll probably release a new version with that code again.

Any other feedback with v1.5.1 is welcome! 👍

Greetings!

@circulosmeos circulosmeos added the bug Something isn't working label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants