BinaryDelimited
Helper methods for reading/writing messages with a length prefix.
enum BinaryDelimited
Helper methods for reading/writing messages with a length prefix.
enum BinaryDelimited
import SwiftProtobuf
Support library for Swift code generated by protoc-gen-swift.
static func merge<M>(into message: inout M, from stream: InputStream, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws where M : Message
Updates the message by reading a single size-delimited message from the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally parsing consumes the entire input. A delimited message is a varint encoding the message size followed by a message of exactly that size.
static func parse<M>(messageType: M.Type, from stream: InputStream, extensions: (any ExtensionMap)? = nil, partial: Bool = false, options: BinaryDecodingOptions = BinaryDecodingOptions()) throws -> M where M : Message
Reads a single size-delimited message from the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally parsing consumes the entire input. A delimited message is a varint encoding the message size followed by a message of exactly exactly that size.
static func serialize(message: any Message, to stream: OutputStream, partial: Bool = false) throws
Serialize a single size-delimited message to the given stream. Delimited format allows a single file or stream to contain multiple messages, whereas normally writing multiple non-delimited messages to the same stream would cause them to be merged. A delimited message is a varint encoding the message size followed by a message of exactly that size.
enum Error
Additional errors for delimited message handing.