Replies: 2 comments
-
See also #62113 |
Beta Was this translation helpful? Give feedback.
-
As much as I hate to say this, that implementation might break when any of those private symbols gets renamed in the codebase. I think what you are looking for is a span based implementation like the encoder/decoder apis in my proposal. Infact, I would love to ship an external library version of that implementation in case it does not make it entirely into .NET 7 however it will be tricky to have it load a modified version of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Even when using a
PipeReader
, aZLibStream
reads more than it needs to inflate up to the required number of bytes (uncompressed size). How can I read the unprocessed bytes?Use case: parsing git packs without indices. A git pack consists of
PACK|version|entries|header|zlib|header|zlib|header|zlib|...
where every header includes the uncompressed size but not the deflated size. Nativezlib
can tell the number of consumed bytes such that the caller can resume its own processing without losing unused buffered bytes.A
PipeReader
contract forZLib
is preferred overStream
.The following hack using
LambdaExpression.Compile()
may work with AOT.Beta Was this translation helpful? Give feedback.
All reactions