Expand description
The pkt-line framing git’s long-running filter protocol speaks.
A packet is four hexadecimal digits of length — counting those four bytes —
followed by the payload. 0000 is a flush, which ends a list. Payloads are
arbitrary bytes, so nothing here may become a String.
Enums§
- Packet
- One item read from the stream.
Constants§
- MAX_
PAYLOAD - Largest payload one packet can carry: git’s limit minus the length prefix.
Functions§
- read_
content - Reads packets until the next flush and concatenates them.
- read_
packet - Reads one packet.
- read_
until_ flush - Reads packets until the next flush, returning their payloads.
- write_
data - Writes one payload, splitting it across packets when it is too long.
- write_
flush - Writes a flush and pushes everything out.