Versions in this module Expand all Collapse all v0 v0.0.2 Sep 23, 2025 v0.0.1 Sep 12, 2025 Changes in this version + const AddInstructionMax + const AddInstructionMin + const CopyInstructionMax + const CopyInstructionMin + const HereMode + const InstructionTableSize + const MinimumFileSize + const NearCacheSize + const RunInstructionMax + const RunInstructionMin + const SameCacheSize + const SelfMode + const VCDAdd + const VCDAdler32 + const VCDAppHeader + const VCDCodetable + const VCDCopy + const VCDDecompress + const VCDIFFMagic1 + const VCDIFFMagic2 + const VCDIFFMagic3 + const VCDIFFVersion + const VCDNoop + const VCDRun + const VCDSource + const VCDTarget + const VarintContinuationBit + const VarintMaxShift + const VarintShiftIncrement + const VarintValueMask + var DefaultCodeTable = BuildDefaultCodeTable() + var ErrCorruptedData = errors.New("corrupted VCDIFF data") + var ErrInvalidChecksum = errors.New("invalid checksum") + var ErrInvalidFormat = errors.New("invalid VCDIFF format") + var ErrInvalidMagic = errors.New("invalid VCDIFF magic bytes") + var ErrInvalidVersion = errors.New("unsupported VCDIFF version") + var VCDIFFMagic = [3]byte + func ComputeChecksum(initial uint32, data []byte) uint32 + func Decode(source []byte, delta []byte) ([]byte, error) + func ReadVarint(reader *bytes.Reader) (uint32, error) + type AddressCache struct + func NewAddressCache(nearSize, sameSize int) *AddressCache + func (ac *AddressCache) DecodeAddress(here uint32, mode byte) (uint32, error) + func (ac *AddressCache) Reset(addresses []byte) + func (ac *AddressCache) Update(address uint32) + type Adler32 struct + type CodeTable struct + func BuildDefaultCodeTable() *CodeTable + func (ct *CodeTable) Get(code byte, slot int) Instruction + type Decoder interface + Decode func(delta []byte) ([]byte, error) + func NewDecoder(source []byte) Decoder + type Header struct + Indicator byte + Magic [3]byte + Version byte + type Instruction struct + Mode byte + Size byte + Type InstructionType + func NewInstruction(instrType InstructionType, size byte, mode byte) Instruction + type InstructionEntry struct + Mode1 byte + Mode2 byte + Size1 byte + Size2 byte + Type1 byte + Type2 byte + type InstructionTable struct + Entries [InstructionTableSize]InstructionEntry + type InstructionType byte + const Add + const Copy + const NoOp + const Run + func (it InstructionType) String() string + type LegacyInstruction struct + Addr uint32 + Data []byte + Mode byte + Size uint32 + Type byte + type ParsedDelta struct + Header Header + Instructions []RuntimeInstruction + Windows []Window + func ParseDelta(delta []byte) (*ParsedDelta, error) + type RuntimeInstruction struct + Addr uint32 + Data []byte + Mode byte + Size uint32 + Type InstructionType + type Window struct + AddressSection []byte + AddressSectionLength uint32 + Checksum uint32 + DataSection []byte + DataSectionLength uint32 + DeltaEncodingLength uint32 + DeltaIndicator byte + HasChecksum bool + InstructionSection []byte + InstructionSectionLength uint32 + SourceSegmentPosition uint32 + SourceSegmentSize uint32 + TargetWindowLength uint32 + WinIndicator byte