BinaryCIF icon indicating copy to clipboard operation
BinaryCIF copied to clipboard

String Array documentation should indicate -1 indicates an empty string

Open epeisach opened this issue 3 months ago • 0 comments

Based on the molstar implementation:

Null strings encoded as -1

Encoder at https://github.com/molstar/molstar/blob/c10f9d8c7885d88506f206d25b66488832ca0b5c/src/mol-io/common/binary-cif/array-encoder.ts#L386C4-L400C14

Decoder:

https://github.com/molstar/molstar/blob/c10f9d8c7885d88506f206d25b66488832ca0b5c/src/mol-io/common/binary-cif/decoder.ts#L176-L193

strings[0] = "" Then strings assembled. The strings array offset is index + 1 -- so a -1 value becomes string[0] -- or empty string.

epeisach avatar Oct 14 '25 11:10 epeisach