Skip to content
go-libfossil Artifact [81b3e86a56]
Login

Artifact [81b3e86a56]

Artifact 81b3e86a564e26a1598993046b2e3c9a4024b38cc22a5b47cb81fc56bec2bfa2:


// Package blob handles content-addressed blob storage in Fossil
// repository databases.
//
// Fossil's blob format is a 4-byte big-endian uncompressed-size prefix
// followed by zlib-compressed data. [Compress] and [Decompress] handle
// this encoding transparently.
//
// [Store] compresses content, computes its SHA1 hash, and inserts it
// into the blob table. [Load] retrieves and decompresses a blob by RID.
// [StoreDeltaRaw] stores content that arrived over the wire already
// delta-encoded, without expanding it.
//
// This package does not decide what gets delta-encoded. Deltifying an
// artifact that is already stored means rewriting an existing row, not
// inserting a new one, and the decision needs to expand content, which
// this package cannot do without importing internal/content. Both live
// in content.Deltify, which is the only place the policy is stated.
// [StoreDelta] inserts a new row as a delta and has no callers outside
// tests; it is not the commit path's primitive.
package blob