Wishlist: compressed notebook format or notebook format with compressed vector images
- Dominant language
- Python
- Stars
- 313
- Forks
- 176
- PR merge metrics
- No merged PRs in 30d
Description
Unaware if this has been discussed already (I tend to think so, but I could not find any reference here). If so, please take my apology in advance for the noise and please be so kind to provide a pointer.
I wonder if it would make sense to have a *compressed* version of the notebook format (e.g. an `.ipynbz` format) with some official blessing. As a parallel, you could consider `svg` and `svgz` for images, where the latter is the former passed through gzip.
Unless there are strong contraindications for that, I believe that there could be the following advantages:
- being mostly text, `ipynb` files compress very well. Their gzip version is often down to 1/4 of the original file;
- when ipynb files contain svg images, these also compress extremely well.
An alternative (possibly better), would be a zip-based format (a la opendocument, docx) say a `.ipnbx` where images get stored as separate entities and the main json data only contains references to them.
A further alternative would be to at least store vector images (svg) in the ipynb file as svgz using the same base-64 encoding employed for other binary formats (e.g, png). This still would save a lot of space for notebooks containing a lot of plots in vector format. Assuming that svgz reduces the files to 25% and that base 64 re-adds 33%, this would still be just 33% of the original file size.
Contributor guide
Research direction
Start by reviewing the existing notebook format and how it represents embedded images; the issue names no files or tests. Compare the proposed compressed notebook, zip-based, and compressed-SVG alternatives with the current format, then determine whether the project wants to adopt one and document or implement that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100