Add BrotliDecompressStreamUninit for uninitialized buffer#41
Conversation
|
I want to ensure that we have a safe-only version of all APIs so someone can compile without any unsafe calls. Can you refactor this so that the unsafe and safe codes are duplicated and that way someone can simply link in the safe calls or the unsafe calls but don't need to go through an unsafe block if they want a safe interface. |
|
I could add a new internal type enum Buffer<'a> {
Uninit(&'a [MaybeUninit<u8>]),
Init(&'a [u8]),
}Then it'd be 100% free of |
|
That sounds possible--- as long as customers of the lib don't need to interact with it, it might let us reuse code better |
|
Got it, I would do the refactor sfter New Years Eve. Happy New Year Eve everyone! |
|
any luck here on the refactor? |
|
Oops thanks for pinging, I lost track of this over time, would try to find some time to work on it |
Having a safe API for
MaybeUninit<u8>would be necessary for async-compression to wrap and reduce the performance penalty of initializing the buffer for alltokio::io::*traits implementation.