JuliusBrussee/caveman · error
zstd read: %w
Error message
zstd read: %w
What it means
Error "zstd read: %w" thrown in JuliusBrussee/caveman.
Source
Thrown at shared/platform/objectstore/compress.go:110
// tiny valid payloads, then independently enforce the exact byte limit.
memoryLimit := uint64(maxBytes)
if memoryLimit < zstd.MinWindowSize {
memoryLimit = zstd.MinWindowSize
}
zr, err := zstd.NewReader(nil,
zstd.WithDecoderConcurrency(1),
zstd.WithDecoderMaxMemory(memoryLimit),
)
if err != nil {
return nil, fmt.Errorf("zstd reader: %w", err)
}
defer zr.Close()
out, err := zr.DecodeAll(data, nil)
if err != nil {
if errors.Is(err, zstd.ErrDecoderSizeExceeded) || errors.Is(err, zstd.ErrWindowSizeExceeded) {
return nil, ErrDecompressedTooLarge
}
return nil, fmt.Errorf("zstd read: %w", err)
}
if int64(len(out)) > maxBytes {
return nil, ErrDecompressedTooLarge
}
return out, nil
default:
return nil, fmt.Errorf("unknown compression codec %q", codec)
}
}
View on GitHub (pinned to 27d5a3981a)
Solutions
- Fix the zstd read error; the data may be truncated.
When it happens
Trigger: Thrown at shared/platform/objectstore/compress.go:110 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/b1bc80bc3de3813d.
Report an issue: GitHub.