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

Fix seekable decompression in-memory api #1695

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

sean-purcell
Copy link
Contributor

Issue noticed in #395 by @P-E-Meunier. I guess I never wrote examples using the in-memory API, oops. New example tests the in-memory api:

$ ./seekable_compression dickens 131072
$ ./seekable_decompression dickens.zst 2000000 2001000 | shasum
8cfd22487cd222b8756d824fa3c4419ab6c722a3  -
$ ./seekable_decompression_mem dickens.zst 2000000 2001000 | shasum
8cfd22487cd222b8756d824fa3c4419ab6c722a3  -

Same test without the patch to zstdseek_decompress.c:

$ ./seekable_decompression_mem dickens.zst 2000000 2001000 | shasum
ZSTD_seekable_init() error : An I/O error occurred when reading/seeking 
da39a3ee5e6b4b0d3255bfef95601890afd80709  -

@Cyan4973
Copy link
Contributor

Thanks for jumping in @iburinoc !
Indeed, creating this test case is very helpful !

We will ensure it's run during CI tests.

@Cyan4973 Cyan4973 merged commit b0a5d38 into facebook:dev Jul 22, 2019
@sean-purcell sean-purcell deleted the seekable-buff branch July 23, 2019 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants