Comments (4)
Yes, the guarantee would hold.
Such final flushes do not create intermediate small blocks. They just ensure that all buffers are completely emptied hence the operation is truly complete.
from zstd.
It's guaranteed if you merely compressStream
, but not if you also employ flush
.
flush
can be abused in creating a lot of tiny blocks which, in extreme cases, might cumulatively reach beyond ZSTD_compressBound()
.
This is really for extreme cases, a few parsimonious flushes here and there shouldn't change the picture here and there,
but the simple fact that it's possible to abuse flush()
to create the above scenario makes it not possible to guarantee ZSTD_compressBound()
when flush()
is employed.
from zstd.
If I use if in the following manner:
compressStream2
with continuecompressStream2
with continue
...
N.compressStream2
with continue
N + 1.compressStream2
with end
N + 2.compressStream2
with flush
That is, call flush at most 1 time after N calls to compressStream2
, does the guarantee still hold?
from zstd.
Nice, thanks!
from zstd.
Related Issues (20)
- We need a ZStd JavaScript library HOT 1
- Compiler warnings present when integrated with Swift Package Manager
- will zstd get nvcomp acceleration or a gpu support like g-brotli? HOT 1
- How can I change the window size? HOT 1
- Increase minimum C standard from C89/C90 to C11 HOT 3
- New zstd 1.5.5 version is two times slower in compression speed than older 1.4.5 version HOT 11
- ZSTD with T option does not scale on multicore CPUs HOT 7
- Question about FSE Huffman literal part
- C++ Builder and mem.h ambiguity HOT 7
- Reducing DCtx Size for Embedded Systems (like esp32) HOT 2
- Automatic code formatting? HOT 1
- No `uncompressed` and `ratio` information in `zstd --list` output if the zstd file is created via pipe HOT 3
- lz4 "legacy" format support HOT 1
- Add common file types that are compressed to ' --exclude-compressed' HOT 3
- windows
- compressing files containing multiple similar portions HOT 5
- head file not found HOT 1
- ZSTD-1.5.2 compress Segmentation fault HOT 4
- Support history buffers in zstd hardware acceleration 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 zstd.