Ark::Bedrock::EventStream
Decodes AWS binary event stream protocol (application/vnd.amazon.eventstream).
Frame layout: 4 bytes total byte length (big-endian) 4 bytes headers byte length (big-endian) 4 bytes prelude CRC32 N bytes headers M bytes payload 4 bytes message CRC32
Constants
HEADER_TYPE_SIZES = {0 => 0, 1 => 0, 2 => 1, 3 => 2, 4 => 4, 5 => 8, 6 => -1, 7 => -1, 8 => 8, 9 => 16}
Fixed byte sizes for header types. -1 = variable length, -2 = unknown.
MAX_FRAME_SIZE = (16 * 1024) * 1024
16 MB — generous upper bound; Bedrock frames are typically < 1 MB.
STRING_TYPE = 7_u8