Comments (6)
Looking at code, I think the first thing would be to make ChunkDecoder
allow uncompressing into ByteBuffer
.
Alternative combinations could include input coming from ByteBuffer
, or both input and output being ByteBuffer
. Amount of code involved is actually not that big, even with 3 new methods (of which 2 are of course optional for now, since request is for uncompressing into buffer).
After this, there would be question of feeding things incrementally -- that is, finding alternatives to InputStream
and OutputStream
. For this, block-by-block operation might work best. Output side of things (relevant here) should actually be quite simple; using ByteBuffer
for input more complex but can be deferred.
from compress.
Thinking about this bit more, I think both compression and decompression could perhaps be best handled via callback interfaces, similar to Uncompressor
.
from compress.
Is there any progress on this issue? We really need this feature. :)
In addition, we also hope to provide the ability to write compressed data directly into ByteBuffer.
from compress.
I don't think anyone has worked on this. Contributions welcome!
from compress.
Hi, sorry for late..
I submitted a pull request to Netty. I copied part of the code and made some modifications so that netty can write data directly to ByteBuf
with lzf:
The problem is that I only modified VanillaChunkEncoder
. It seems that UnsafeChunkEncoder
is more complicated for this situation.
For the scenario of using ByteBuffer
under Unsafe
, how can we achieve it? I have no plan yet...
from compress.
Since DirectByteBuffer itself uses unsafe for reading and writing, it seems that we do not need to resort to additional Unsafe... Let me try it...
from compress.
Related Issues (20)
- Add a method to encode directly into given output buffer (of guaranteed size) HOT 1
- Implement encoder (compressor) that makes use of sun.misc.Unsafe HOT 1
- Unsafe-based decompressor of 0.9.7 fails on 2 sample files from 'maxcomp' data set HOT 1
- Improve 'DataHandler` callback to allow early termination HOT 1
- Expose number of bytes read from `InputStream`, via `LZFInputStream` HOT 1
- Unsafe clean up of Thread Local Value
- Add new variants for "compress only if comp rate at least N" HOT 1
- Incorrect de-serialization leading to stream corruption in Big Endian systems HOT 9
- Add convenience method(s) for GZIP read/write
- Document parallel compression task
- OptimizedGZIPInputStream fails on chunked stream HOT 2
- estimateMaxWorkspaceSize() is too small HOT 9
- did not start with 'ZV' signature bytes HOT 5
- API changes report for Compress LZF
- Fix issues outlined by "lgtm.com"'s static analysis HOT 1
- Add Java 9+ module info using Moditect HOT 1
- `Unsafe` needs support in `module-info.java` HOT 1
- Mistaken Code in k8s HOT 1
- Maintenance, Contributor access? HOT 11
- README links are broken
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 compress.