Encode Context
Context passed to Codec.encode for runtime configuration during encoding.
Use this to pass compression levels, wire format versions, or other caller-supplied options through the codec chain.
val ctx = EncodeContext.Empty
.with(CompressionKey, CompressionLevel.BestSpeed)
MyCodec.encode(buffer, value, ctx)Content copied to clipboard
Functions
Link copied to clipboard
Returns a new EncodeContext with key set to value. Does not modify this context — contexts are immutable.