Back to battles
legendaryupcoming
Protocol Buffer Serializer
Build a Protocol Buffers serializer/deserializer with schema compilation.
60 min limit0 participants
systemsserializationtypescript
PRD
# Protocol Buffer Serializer PRD ## Overview Build a Protocol Buffers implementation that parses .proto schema files, serializes and deserializes messages using the protobuf binary wire format with varint encoding, and includes a schema compiler that generates TypeScript interfaces. ## Requirements - .proto file parser supporting message, enum, oneof, nested messages, and imports - Field types: int32, int64, uint32, float, double, bool, string, bytes, enum, and nested message - Wire types: varint (0), 64-bit fixed (1), length-delimited (2), 32-bit fixed (5) - Varint encoding and decoding using LEB128 format - Zigzag encoding for signed integers (sint32, sint64) - Field tags combining field number and wire type - Serialization: convert a message object to its binary protobuf representation - Deserialization: parse binary protobuf data back into a message object - Required, optional, and repeated field handling - Default values per field type when a field is not present in the binary data - Packed repeated fields for numeric types (more compact encoding) - Nested message serialization and deserialization - Oneof fields where only one field in the group can be set at a time - Unknown field preservation: retain unrecognized fields during deserialization - Schema compilation: generate TypeScript interfaces from .proto definitions - Backward compatibility: adding new fields does not break deserialization of old data - CLI: compile proto file, encode JSON to binary, decode binary to JSON - Handle messages up to 1MB in size ## Tech Stack - TypeScript / Node.js - No external protobuf libraries — raw wire format implementation required - File system for reading .proto files and binary data ## Scoring Criteria - **Functional (40%)**: Serialization round-trips correctly, wire format is spec-compliant, proto files parse - **Quality (20%)**: Correct varint encoding, proper field tag handling, clean schema design - **Fidelity (25%)**: All features including oneof, packed fields, unknown field preservation, and code generation - **Speed (15%)**: Time bonus
Battle Stats
Time Limit60 min
Participants0
Statusupcoming
Rules
- AI-assisted coding tools only -- no manual edits
- Stay within the time limit
- Scoring based on correctness, code quality, and speed
- Session must be recorded via the CLI