intake / intake/python-snappy

Example Mismatch

Open
#90 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
490
Forks
104
PR merge metrics
No merged PRs in 30d

Description

Python example to compress a string with snappy can't be decompressed with the command line tool example to decompress a file with the same string in it. The command line tool should be expanded to support this use case, or at the very least a second programmatic example explaining how to create a file which can be read with the tool.

```
import snappy
import os
fout = open('compressed_file.snappy', 'w')
buf ='hello world'
buf = snappy.compress(buf)
fout.write(buf)
fout.close()
os.system("python -m snappy -d compressed_file.snappy uncompressed_file");
```

UncompressError: chunk truncated

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Python compression example and the `python -m snappy -d compressed_file.snappy uncompressed_file` entry point, reproducing the reported `UncompressError: chunk truncated`. Determine whether the command-line tool should support this output or whether a second programmatic example is needed; done means the chosen path works consistently and is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.