File tree Expand file tree Collapse file tree
rust/property-vals-rs/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,17 @@ use std::fmt;
22
33use crate :: types:: { PropertyType , PropertyValueMessage } ;
44
5- /// Compact binary wire format for the intermediate topic. Layout after the
6- /// magic+version header: varint team_id, type tag (0=event, 1=person,
7- /// 2=group followed by the group index byte), then length-prefixed key and
8- /// value strings, then varint count. The magic byte distinguishes records
9- /// from JSON (`{`) and from the LZ4 frame magic, so all three coexist on the
10- /// topic during rollout.
5+ /// Compact binary format for intermediate topic records:
6+ ///
7+ /// - magic + version header
8+ /// - team_id (varint)
9+ /// - type tag (0 = event, 1 = person, 2 = group + index byte)
10+ /// - key (varint length + utf8 bytes)
11+ /// - value (varint length + utf8 bytes)
12+ /// - count (varint)
13+ ///
14+ /// The magic byte distinguishes records from JSON (`{`) and the LZ4 frame
15+ /// magic, so consumers can sniff which decoder to use.
1116pub const MAGIC : [ u8 ; 3 ] = * b"PV\x01 " ;
1217
1318const TAG_EVENT : u8 = 0 ;
You can’t perform that action at this time.
0 commit comments