This repository was archived by the owner on May 27, 2025. It is now read-only.

Description
I want to be able to easily navigate in python some datasets that are the result of leafy-dataset-query (gzipped).
Because the File objects in python are standard it should be simple to do so:
with gzip.open(filename, 'rb') as f: snark.imaging.cv_image.read(f)
However there are two issues:
- leafy-dataset-query has a custom header
- for some reason using np.fromfile(f, ...) doesn't give the right data out, however np.frombuffer(read(f, ...)) does
I have addressed these and tested on gzip'd and raw .bin files.
Patch here: https://pastebin.com/2ire5fq0