Decode Context
Context passed to Codec.decode for runtime configuration during decoding.
Use this to pass allocator hints, security policies, compression config, or any other caller-supplied option through the codec chain without global state.
val ctx = DecodeContext.Empty
.with(PngCodec.AllocatorKey, hwAllocator)
.with(MaxSizeKey, 1_000_000)
val result = MyCodec.decode(buffer, ctx)Content copied to clipboard
Functions
Link copied to clipboard
Returns a new DecodeContext with key set to value. Does not modify this context — contexts are immutable.