Module encoder

Module encoder 

Source
Expand description

Zero-copy Protobuf encoder for Qdrant gRPC protocol.

This module implements direct wire format encoding without intermediate struct allocations. Key optimizations:

  • Pre-computed field tag bytes
  • Buffer reuse via BytesMut
  • Direct memcpy for vectors (no per-element loop)

Functionsยง

encode_create_collection_proto
Encode CreateCollection request to protobuf wire format.
encode_delete_collection_proto
Encode DeleteCollection request.
encode_delete_points_proto
Encode a DeletePoints request.
encode_search_proto
Encode a SearchPoints request directly to protobuf wire format.
encode_upsert_proto
Encode an UpsertPoints request to protobuf wire format.
encode_varint
Encode a varint (variable-length integer) into the buffer. Uses 7 bits per byte, MSB indicates continuation.
encode_varint_u64
Encode a u64 varint.
encode_with_payload_true
Encode with_payload = true as a sub-message.