BML
What is BML?
What is BML?
- BML stands for Binary Markup Language
- BML was designed to carry data.
- BML was designed to be used in a file or in digital communication (socket, digital bus, ...).
- BML was designed to be light for encoding and decoding.
- BML tags are not predefined. You must define your own tags. Tags can be string, integer, or custom binary data.
- BML elements handle child elements as XML.
What are the differences between BML and XML ?
What are the differences between BML and XML ?
- An XML document is a string of character. A BML document is binary.
- An XML document is divided into Markup and Content. A BML document is divided into Headers with size information and Content
- BML does not handle attributes.
- BML handles Extensions. Extensions can be used to add custom fields to content or headers.
BML libraries & bindings:
BML libraries & bindings:
- LIBBML (https://github.com/seagnal/bml) contains:
- DOM XML equivalent C++ library : BML_NODE
- SAX XML equivalent C library : SAB
- Octave bindings
- Python bindings
BML Documentations:
BML Documentations:
- BML & Libraries. This document contains format specification and libraries usage.
- BML presentation and library usage
BML Format specification 1.1:
BML Format specification 1.1:
Section Element BML
Section Element BML
- Section Header BML
- Section FH
- EIF
- Format: 1 bit.
- 1: An extension section is available in current node
- 0: No extension section
- ISS
- Format: 3 bits unsigned integer.
- if DSS != 0xF :
- ISS means the size of Tag Size Section (minus 1)
- else :
- ISS == 0x7: Invalid Node (Used to mark end of children list)
- ISS == 0: Bypass Node (Mainly used to byte align content)
- Other behavior not defined
- DSS
- Format: 4 bits unsigned integer.
- if DSS == 0xF
- This node is special, ISS contains special features
- else
- Size of Data Size (If 0, No Data section)
- Section Header Extension
- Section FEH
- EIF
- Format: 1 bit.
- 1: Another extension section is available after current
- 0: No further extension section
- ESS
- Format: 3 bits unsigned integer.
- ESS means the size of EXT Size Section (minus 1)
- EID
- Format: 4 bits unsigned integer.
- ID of extension. This can be used freely. (In current decoding libray used to mix order of first 16 extensions)
- File Header BML