Skip to content

Commit 728b7e6

Browse files
committed
python docs
1 parent eb137b8 commit 728b7e6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

python/tskit/metadata.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ class JSONStructCodec(AbstractMetadataCodec):
201201
The codec expects a metadata schema with separate ``json`` and ``struct``
202202
subschemas and produces a single dict containing the union of the keys from
203203
those subschemas after decoding.
204+
205+
The structure of the encoded metadata is as follows: first, a fixed-size
206+
header that contains the number of bytes for both ``json`` and ``struct``
207+
portions; next, the json; then a variable number of zeroed padding bytes
208+
that brings the length to a multiple of 8 for alignment; and finally
209+
the struct-encoded binary portion.
204210
"""
205211

206212
MAGIC = b"JBLB"

0 commit comments

Comments
 (0)