Comments (2)
Hi @Technerder, would you be able to provider a small test case that can reproduce your example ?
I tried on a small payload and this seems to run fine for me:
package main
import (
"bufio"
"bytes"
"fmt"
"github.com/DataDog/zstd"
)
func main() {
exampleString := "This is\na multiline\nexample\n"
compressed, err := zstd.Compress(nil, []byte(exampleString))
if err != nil {
panic(err)
}
fileScanner := bufio.NewScanner(zstd.NewReader(bytes.NewBuffer(compressed)))
fileScanner.Split(bufio.ScanLines)
for fileScanner.Scan() {
fmt.Printf("%s\n", fileScanner.Text())
}
}
returns
ᐅ go run example.go
This is
a multiline
example
from zstd.
Sure
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
{"key": "value"}
The zip file contains both the raw and zstd compressed files, since I wasn't able to upload a .zst
file to the comment.
from zstd.
Related Issues (20)
- ctx creation and customition HOT 3
- Mac M1 help HOT 1
- Decompress does not detect missing checksum
- Unable to decompress valid zstd content HOT 1
- Undefined behavior triggered in C code HOT 2
- Clarify zstd.NewWriterLevel usage for `n` separate units
- Not Support Apple M1 HOT 2
- Setting decompression WindowSize? HOT 1
- Update to Zstandard v1.5.5 HOT 1
- Unable to read valid zst file in version 1.5.2
- Decompress return UnexpectedEOF if Skippable frames written HOT 1
- failed to decompress: Unknown frame descriptor If padding is attached after compression HOT 7
- Building build/bin/configtxgen ERROR HOT 1
- Support zstd dictionary API for non-streaming use HOT 4
- If I have two types data --compressed and uncompressed, when I call the DeCompress function, would it report an error? HOT 1
- Add Go module file HOT 2
- TestStreamCompressionDecompressionParallel frequently fails on machines with many cpus HOT 8
- [zstd_stream] Reader.Read can block even if a zstd block is available HOT 1
- Can not work with archive/tar 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 zstd.