Comments (5)
I am not sure what you are experiencing as the example you gave works fine?
from lz4.
sorry, i gave a wrong version code. see https://go.dev/play/p/vy3P3HZepF_r, which use v4 version.
in code, i write data with length 11 to writer, then I use a buffer with length 12 to read back. But the v4 version can't read the result, it try to fullfill the 12 length buffer.
from lz4.
Because you need to handle the error, which in this case is io.EOF as expected.
See https://go.dev/play/p/tikjFzpdika
from lz4.
What if (in line 20) the writer was not close the the pipe? (it is used to write other message later, in my application). In which case, the writer have flush the message, but reader is still stucked.
ps: v3 is works fine, and snappy https://github.com/golang/snappy works fines.
from lz4.
@pierrec sorry for bother you.
It seems like that the read ends when len(read_buf) == 0
, and this may leads to read block. Is this as your expectation or something we misunderstood?
As this example, https://go.dev/play/p/xu9MkdTk0Oy, zw.close
is removed now, read will block and exit with all goroutines are asleep
.
from lz4.
Related Issues (20)
- Write after Flush writes 0 bytes, no error because state is closed.
- Java compress data can not be decompress HOT 5
- Data race when using concurrency > 1
- [RSVP] What is the source of xxh32zero.go? HOT 2
- lz4: invalid source or destination buffer too short HOT 3
- jsonlz4: lz4: invalid source or destination buffer too short HOT 1
- I got error 403 HOT 1
- avoid uncompressed duplicates in testdata to make module smaller
- commit bc1239b broke decompressing legacy-compressed bytes in normal mode HOT 1
- Dictionary support in compression HOT 1
- [arm64] Performance regression from removal of 4x loop decoding HOT 2
- .unity3d lz4 compression and decompression HOT 1
- Invalid magic number when decompressing. Headers not added when compressing
- when i use lz4 compress and java use lz4 uncompress HOT 2
- Reader oriented encoder HOT 3
- CLI: Only compression level 0 supported, others give error "lz4: invalid compression level: 1" HOT 3
- Uncompressing quite slow in sparsely compressed data HOT 2
- Help decoding a lz4 block format HOT 4
- Slower than Snappy for smaller sizes. HOT 1
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 lz4.