Skip to content

Latest commit

 

History

History

vlen-utf8

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Vlen-utf8 codec

Defines an array -> bytes codec that serializes variable-length UTF-8 string arrays.

Codec name

The value of the name member in the codec object MUST be vlen-utf8.

Configuration parameters

None.

Example

For example, the array metadata below specifies that the array contains variable-length UTF-8 strings:

{
    "data_type": "string",
    "codecs": [{
        "name": "vlen-utf8"
    }],
}

Format and algorithm

This is a array -> bytes codec.

This codec is only compatible with the "string" data type.

In the encoded format, each chunk is prefixed with a 32-bit little-endian unsigned integer (u32le) that specifies the number of elements in the chunk. This prefix is followed by a sequence of encoded elements in lexicographical order. Each element in the sequence is encoded by a u32le representing the number of bytes followed by the bytes themselves. The bytes for each element are obtained by encoding the element as UTF8 bytes.

See https://numcodecs.readthedocs.io/en/stable/other/vlen.html#vlenutf8 for details about the encoding.

Change log

No changes yet.

Current maintainers