#container #archive #file-format

bin+lib jubako

The reference implementation of the Jubako container format

3 unstable releases

0.2.1 Feb 20, 2024
0.2.0 Feb 6, 2024
0.1.0 Oct 13, 2022

#349 in Database interfaces

Download history 9/week @ 2024-02-01 137/week @ 2024-02-15 80/week @ 2024-02-22 24/week @ 2024-02-29 4/week @ 2024-03-07 3/week @ 2024-03-14

139 downloads per month
Used in 6 crates

MIT license

470KB
13K SLoC

Jubako

What is Jubako ?

Jūbako is the traditional lunch box used in Japan to store Bentos. It is a small box that stores food in small compartments.

Jubako is a container format to store things in organized manner. It is composed of packs that can be composed as needed.

It is container format extensible to fulfill specific need. As any container format it allow to store content in the container. It has some specificity :

  • Content can be compressed or not. Decide whether the content is compressed or not is made at content level.
  • Direct access. You don't need to decompress the whole archive on the file system or in memory to access a content.
  • Content is accessed using one or several entries stored in indexes.
  • The metadata (stored in the entries) are not defined. Each use case can (and must) specify which metadata to store.
  • Each entry can point to one content (basic use case) but it is not necessary. An entry can point to several contents or none.
  • The content can come in different variants. For example, images can be in low and high resolution.
  • Jubako can be incremental. It is possible to create archive containing only the difference between an existing archive and the content you want to store. (To implement)
  • Content can be put in different packs inside a container. Packs may be missing or reused in another Jubako container.

What Jubako is not ?

Jubako is not a file format.

As xml, Jubako is a format describing how to store content and how it is structured. It doesn't specify what is stored and the hierarchy between those content.

The classical usage Jubako is to be used as base structure for a real life container.

Using Jubako

Jubako library is the low level library to read and write Jubako container. Jubako format is somehow a metaformat, each user (vendor) of Jubako has to specify its own format based on Jubako.

So, the classic use case is to create a library on top of jubako to wrap jubako structure and provide high level implementation.

You can have a look to arx which is file archive based on Jubako or waj to store website.

Specification

You can find the specification and other documentation in the spec directory.

Dependencies

~10MB
~189K SLoC