diff options
| author | 2026-03-28 16:13:55 +0000 | |
|---|---|---|
| committer | 2026-03-28 16:13:55 +0000 | |
| commit | d3cfc1932e71994ec866f6bea67615c58878f952 (patch) | |
| tree | b2e05e30b4b84423d51bd2a9dbdd49cea257062e /object/store/loose | |
| parent | object/store: Document writing interface lack (diff) | |
| signature | No signature | |
object/store/packed: Expect length and verify Adler-32
Diffstat (limited to 'object/store/loose')
| -rw-r--r-- | object/store/loose/read_bytes.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/object/store/loose/read_bytes.go b/object/store/loose/read_bytes.go index 0b6da81b..87a9f020 100644 --- a/object/store/loose/read_bytes.go +++ b/object/store/loose/read_bytes.go @@ -29,6 +29,9 @@ func (store *Store) readBytesParsed(id objectid.ObjectID) ([]byte, objecttype.Ty } // ReadBytesFull reads a full serialized object as "type size\0content". +// +// It inflates and parses the full loose object, including consuming the zlib +// stream through its Adler-32 trailer. func (store *Store) ReadBytesFull(id objectid.ObjectID) ([]byte, error) { raw, _, _, err := store.readBytesParsed(id) if err != nil { @@ -39,6 +42,9 @@ func (store *Store) ReadBytesFull(id objectid.ObjectID) ([]byte, error) { } // ReadBytesContent reads an object's type and content bytes. +// +// Like ReadBytesFull, it inflates and parses the full loose object, including +// consuming the zlib stream through its Adler-32 trailer. func (store *Store) ReadBytesContent(id objectid.ObjectID) (objecttype.Type, []byte, error) { _, ty, content, err := store.readBytesParsed(id) if err != nil { |
