Encoding
COBS byte stuffing API
Encodes/decodes Consistent Overhead Byte Stuffing, removing zero bytes from a frame so 0x00 can be used as a packet delimiter, reporting the overhead added. Answers 'What is the COBS encoding of this frame?', 'Decode this COBS packet.'
Price$0.02per request
MethodPOST
Route/v1/encoding/cobs
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
cobsbyte-stuffingframingserialencodedecodepacketencoding
API URL
Integration docshttps://x402.hexl.dev/v1/encoding/cobsExample request
{
"value": "1100020033",
"inputEncoding": "hex"
}Example response
{
"operation": "encode",
"result": "021102020233",
"byteLength": 6,
"overhead": 1,
"interpretation": "COBS-encoded 5 bytes to 6 bytes (overhead 1)."
}Input schema
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string",
"examples": [
"1100020033"
]
},
"operation": {
"type": "string",
"enum": [
"encode",
"decode"
]
},
"inputEncoding": {
"type": "string",
"examples": [
"hex",
"utf8",
"base64"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}