Encode data into protobuf's Tag-Len-Val or Tag-Val format, where: (1) Tag is varint encoded containing wire-type (lowest 3-bits) packed with field number (2) Len is varint encoded containing number of bytes that Val occupy; only present of wire-type 2 (3) Val is varint encoded for wire-type 0, or a fixed length for wire-type 1 and 5, or a continuous length of bytes for wire-type 2
Wire-Type 0 VARINT int32, int64, uint32, uint64, sint32, sint64, bool, enum 1 I64 fixed64, sfixed64, double 2 LEN string, bytes, embedded messages, packed repeated fields 3 SGROUP group start (deprecated) 4 EGROUP group end (deprecated) 5 I32 fixed32, sfixed32, float Note SGROUP and EGROUP are not supported
For more info https://developers.google.com/protocol-buffers/docs/encoding
Encode data into protobuf's Tag-Len-Val or Tag-Val format, where: (1) Tag is varint encoded containing wire-type (lowest 3-bits) packed with field number (2) Len is varint encoded containing number of bytes that Val occupy; only present of wire-type 2 (3) Val is varint encoded for wire-type 0, or a fixed length for wire-type 1 and 5, or a continuous length of bytes for wire-type 2 Wire-Type 0 VARINT int32, int64, uint32, uint64, sint32, sint64, bool, enum 1 I64 fixed64, sfixed64, double 2 LEN string, bytes, embedded messages, packed repeated fields 3 SGROUP group start (deprecated) 4 EGROUP group end (deprecated) 5 I32 fixed32, sfixed32, float Note SGROUP and EGROUP are not supported For more info https://developers.google.com/protocol-buffers/docs/encoding
(write-bytes writer field-num binary)
Write binary writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number binary = binary data to be copied by writer
Write binary writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number binary = binary data to be copied by writer
(write-packed writer field-num field-type values)
Write a sequence as packed writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number field-type = :int32 | :int64 | :uint32 :uint64 | :sint32 | :sint64 | :bool | :enum | :fixed32 | :sfixed32 | float | :fixed64 | :sfixed64 | double | :string values = sequence to be encoded
Write a sequence as packed writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number field-type = :int32 | :int64 | :uint32 :uint64 | :sint32 | :sint64 | :bool | :enum | :fixed32 | :sfixed32 | float | :fixed64 | :sfixed64 | double | :string values = sequence to be encoded
(write-pri writer field-num field-type value)
Write a primitive field where writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number field-type = :int32 | :int64 | :uint32 :uint64 | :sint32 | :sint64 | :bool | :enum :fixed32 | :sfixed32 | :float | :fixed64 | :sfixed64 | :double | :string | :bytes value = value corresponding to field-type above
Write a primitive field where writer = clojobuf-codec.io.writer.ByteWriter (defprotocol) field-num = field number field-type = :int32 | :int64 | :uint32 :uint64 | :sint32 | :sint64 | :bool | :enum :fixed32 | :sfixed32 | :float | :fixed64 | :sfixed64 | :double | :string | :bytes value = value corresponding to field-type above
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close