WORM0 Format definition
WORM0HistoryPureBasic modulePureBasic source bundleC sourceC headerJavaScript sourceC / JavaScript bundlePort contracts
Generation 26 contract
WORM0 generation 26 has a 28-byte header and 13-byte chunk records. One resource is stored per container. Codec identifiers select Raw (0), BriefLZ (1), RFXL (16), RAU (32), RFXA (48), LeXA text/font (64/65) or FormA (80). The decoder enforces exact chunk sizes and total payload length. The source defines name, resource type and integrity metadata.
This is a concise format overview. The bundled reference module is the authoritative field-by-field and bitstream definition; it includes the required structures, constants, encoder and decoder. Input and output are memory buffers. File access and playback or rendering belong to the host application.
Public operations
Declare.s QualityName(Quality.i)
Declare.s CodecName(Codec.i)
Declare.i QualityFromText(Text.s)
Declare.l FNV1a32(*memory, size.i)
Declare.i EncodePackMemory(*Input, InputSize.i, ResourceName.s = "", Quality.i = #Quality_Lossless, ChunkSize.i = #DefaultChunkSize, *OutSize.Integer = #Null, ResourceType.i = #Type_Bytes)
Declare.i DecodeFirstResourceMemory(*Pack, PackSize.i, *OutSize.Integer = #Null)
Declare.i DecodePayloadMemory(*Packed, PackedSize.i, Codec.i, UnpackedSize.i, *OutSize.Integer = #Null)The source bundle preserves the include paths and contains all literal include dependencies and the MIT license. The individual module is not advertised as a dependency-free distribution.
C and JavaScript
The memory ports encode and decode generation-26 streams. The port contracts specify dependencies, buffer ownership, data structures, encoder differences and exchange-format boundaries. The complete C/JavaScript source bundle preserves shared dependency paths. Browser file conversion is separate from the codec core.