Comments (2)
// incorrect when copy to bufferWriter
Perhaps it depends on the implementation of IBufferWriter<> whether this is incorrect or not. Normally, this would be expected to work.
But as you say, it may be useful to calculate the buffer size in advance.
I would consider implementing this in #235.
from memorypack.
In #235, BrotliCompressor.GetMaxCompressedLength()
was added.
Now we can get the maximum expected size after compression before CopyTo
.
Note that this is a pre-calculation, so it is the maximum possible size, not the exact size after compression.
However, I think it is sufficient for pre-compression buffer space purposes.
from memorypack.
Related Issues (20)
- CS0103 issue when upgrade project from NET6.0 to NET8.0 HOT 3
- Native AOT fully compatibility
- namespace issues with code generator version 1.2x HOT 12
- BrotliCompressor.CompressCore rare case
- Something change with decimal types? HOT 2
- Why are you dropping support for older Unity? HOT 1
- 1.20.2 breaks enum property initialization when enum is declared in another project HOT 1
- Guidance for migrating from MessagePack to MemoryPack HOT 1
- Deserialization logic assumes `null` default for some value types in v1.20.X HOT 3
- Regression with base classes HOT 1
- Can we have ConvertToJson? HOT 1
- MemoryPackSerializationException when deserializing a union interface on Android/iOS HOT 1
- [Question] Is there any code style for this project for contributing to the repo HOT 2
- Dictionary<string,byte[]> formatter is being trimmed with PublishAot HOT 4
- Cannot serialize class with a generics in NativeAOT HOT 1
- Unity 2023.2.10f1 gives error in Generator HOT 8
- Add pragma warning disable CS0618 to MemoryPackGenerator.Emitter.cs HOT 1
- MinimalApi Support HOT 1
- Error when using -langversion:preview in Unity 2023.2.16f1
- Infinite loop in BrotliEncoder HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memorypack.