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

Streaming writes in framing2-format not supported #28

Closed
dpq opened this issue Nov 16, 2021 · 4 comments
Closed

Streaming writes in framing2-format not supported #28

dpq opened this issue Nov 16, 2021 · 4 comments

Comments

@dpq
Copy link

dpq commented Nov 16, 2021

Hi,

Currently snzip lacks the ability to decompress files written with snappy.NewBufferedWriter() streaming writer. Upon reading the header of the next snappy frame it throws an error:

framing2-format.c:227: Unsupported identifier 0x73.

Other tools like python-snappy have been verified to work with this format correctly.

@kubo
Copy link
Owner

kubo commented Nov 17, 2021

Hi @dpq,

Could you post a reproducible example?
How did you compress and decompress files?

I did the following on Ubuntu 20.04. It works fine.

$ pip3 install --user python-snappy  # install python-snappy
$ echo Hello World | python3 -m snappy -c > hello-world.sz     # compress by python-snappy
$ file hello-world.sz   # verify that the file format is snappy framed.
hello-world.sz: snappy framed data
$ cat hello-world.sz | ./snzip -d   # uncompress by snzip
Hello World

@dpq
Copy link
Author

dpq commented Nov 17, 2021

Hi, I can post a sample in a bit but the gist of it is that I had sort of like several snappy files concatenated to each other due to an error on my part. I.e. snzip was balking at the second frame's header's "s" character (sNaPpy).

@kubo
Copy link
Owner

kubo commented Nov 18, 2021

Thanks.
I confirmed that snzip failed to decompress a concatenated file

$ echo Hello World | python3 -m snappy -c > hello-world.sz
$ cat hello-world.sz hello-world.sz > hello-world-concatenated.sz
$ cat hello-world-concatenated.sz | python3 -m snappy -d
Hello World
Hello World
$ cat hello-world-concatenated.sz | ./snzip -d
Hello World
Unsupported identifier 0x73

kubo added a commit that referenced this issue Nov 22, 2021
@kubo kubo closed this as completed in b607e60 Nov 22, 2021
@kubo
Copy link
Owner

kubo commented Nov 22, 2021

This issue was fixed by b607e60.
I'll release 1.0.5 before this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants