Skip to content

Commit f686969

Browse files
andyzzhaoclaude
andcommitted
chore(property-vals): rewrite wire format doc comment as a layout list
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9be8a85 commit f686969

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

rust/property-vals-rs/src/wire.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ use std::fmt;
22

33
use 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.
1116
pub const MAGIC: [u8; 3] = *b"PV\x01";
1217

1318
const TAG_EVENT: u8 = 0;

0 commit comments

Comments
 (0)