You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support uninitialized caller output buffers (MaybeUninit<u8>) #11
All internal backends in bases already write directly into &mut [MaybeUninit<u8>], avoiding redundant zero-fills in encode, decode, and decode_array. However, the public caller-buffer methods encode_into and decode_into in bases/src/codec.rs still require an initialized &mut [u8], forcing stack-buffer callers ([0_u8; N]) to zero-initialize memory upfront and preventing direct zero-copy writes into Vec::spare_capacity_mut() or BytesMut::spare_capacity_mut().
Considerations
Without introducing external dependencies such as outref, compare adding explicit encode_into_uninit and decode_into_uninit methods (returning initialized &mut str and &mut [u8]) against providing a minimal zero-dependency output buffer wrapper that accepts both &mut [u8] and &mut [MaybeUninit<u8>].
Check whether Encoder::update / finish and Decoder::update / finish should mirror the same choice or keep slice APIs minimal.
Activity