JuliaIO / JuliaIO/ChunkCodecs.jl

Support external dictionaries

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
8
Forks
3
Avg merge
5h 21m
Merged PRs (30d)
4

Description

Some libraries such as zlib and zstd support using external dictionaries to improve the compression performance for small files: https://facebook.github.io/zstd/zstd_manual.html#Chapter10

The same dictionary is then required to decode the data.

This can be implemented with the current API by adding a dictionary field to the Codec struct, but there are some complications.

  1. When encoding, the raw dictionary isn't directly useful. It first needs to be digested. It would be nice to cache the digested dictionary somewhere because often the same dictionary is used repeatedly.
  2. Sometimes dictionaries have an associated ID, and the encoded data has a dictionary ID stored in a header. I think the idea is that a decoder could have multiple dictionaries, and then pick one to use based on the ID in the header, though I'm not sure how this would work as part of a larger format like Zarr.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Codec struct and the zstd manual linked in the issue, then trace how encoding and decoding currently receive codec state. Define what external dictionary caching and dictionary-ID selection should mean, including behavior when used in a larger format such as Zarr; the work is done when that API and its edge cases are specified and supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.