JuliusBrussee/caveman · error · ErrDecompressedTooLarge
objectstore: decompressed payload exceeds limit
Error message
objectstore: decompressed payload exceeds limit
What it means
Error "objectstore: decompressed payload exceeds limit" thrown in JuliusBrussee/caveman.
Source
Thrown at shared/platform/objectstore/compress.go:26
"io"
"github.com/klauspost/compress/zstd"
)
// Compression names the supported codecs; they mirror the artifacts.compression
// CHECK constraint (none|gzip|zstd). An unknown codec fails closed.
const (
CompressionNone = "none"
CompressionGzip = "gzip"
CompressionZstd = "zstd"
)
var (
zstdEnc, _ = zstd.NewWriter(nil)
// ErrDecompressedTooLarge is returned before a compressed payload can
// expand beyond the caller's plaintext ceiling.
ErrDecompressedTooLarge = errors.New("objectstore: decompressed payload exceeds limit")
)
// DefaultMaxDecompressedBytes protects callers that do not have trusted size
// metadata. Callers with an expected plaintext size should use
// DecompressLimit with the smaller, metadata-validated limit.
const DefaultMaxDecompressedBytes int64 = 128 << 20
// Compress encodes data with the named codec. "none" returns data unchanged.
func Compress(codec string, data []byte) ([]byte, error) {
switch codec {
case CompressionNone, "":
return data, nil
case CompressionGzip:
var buf bytes.Buffer
zw := gzip.NewWriter(&buf)
if _, err := zw.Write(data); err != nil {
return nil, fmt.Errorf("gzip: %w", err)
}View on GitHub (pinned to 27d5a3981a)
Solutions
- Reduce the decompressed payload below the limit.
When it happens
Trigger: Thrown at shared/platform/objectstore/compress.go:26 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/2ab92b4d4c3d4200.
Report an issue: GitHub.