s3-orchestrator

chunkframing

import "github.com/afreidah/s3-orchestrator/internal/integration/chunkframing"

Index

Constants

MaxChunkSizeBytes caps a single declared chunk during validation. AWS SDKs default to 64 KiB; values beyond this threshold are treated as a negative signal.

const MaxChunkSizeBytes = 16 * 1024 * 1024

MinProbeBytes is the minimum head-window size required to validate the unsigned variant across two consecutive 64 KiB chunks.

const MinProbeBytes = 64*1024 + 1024

type Variant

Variant names a recognised flavour of aws-chunked framing.

type Variant string

const (
    // VariantNone indicates the head bytes do not look like chunked framing.
    VariantNone Variant = ""
    // VariantSigned matches the leading line of STREAMING-AWS4-HMAC-SHA256-
    // PAYLOAD or its TRAILER-suffixed sibling.
    VariantSigned Variant = "signed"
    // VariantUnsignedTrailer matches the bare-hex chunk framing emitted by
    // STREAMING-UNSIGNED-PAYLOAD-TRAILER.
    VariantUnsignedTrailer Variant = "unsigned_trailer"
)

func Detect

func Detect(head []byte) Variant

Detect classifies the head of an object body. Returns the recognised variant when bytes match a chunked-framing layout, or VariantNone when they look like ordinary content.

Generated by gomarkdoc