aboutsummaryrefslogtreecommitdiff
path: root/packfile/ingest/entry_header.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-26 09:17:14 +0000
committerGravatar Runxi Yu2026-03-26 09:18:30 +0000
commit3e884f5f3d42cbc4874a04da31dde10314b0cfad (patch)
treef5e1e325fd1a2a0801791c054010213214475d80 /packfile/ingest/entry_header.go
parentnetwork/receivepack: Rename from receivepack (diff)
signatureNo signature
format: Move commitgraph and packfile here
Diffstat (limited to 'packfile/ingest/entry_header.go')
-rw-r--r--packfile/ingest/entry_header.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/packfile/ingest/entry_header.go b/packfile/ingest/entry_header.go
deleted file mode 100644
index c74fdc16..00000000
--- a/packfile/ingest/entry_header.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package ingest
-
-import (
- "codeberg.org/lindenii/furgit/internal/intconv"
- objecttype "codeberg.org/lindenii/furgit/object/type"
-)
-
-// encodePackEntryHeader encodes one non-delta packed entry header.
-func encodePackEntryHeader(ty objecttype.Type, size int64) []byte {
- var out [16]byte
-
- n := 0
-
- s, err := intconv.Int64ToUint64(size)
- if err != nil {
- panic(err)
- }
-
- c := (uint8(ty) << 4) | byte(s&0x0f)
-
- s >>= 4
- for s != 0 {
- out[n] = c | 0x80
- n++
- c = byte(s & 0x7f)
- s >>= 7
- }
-
- out[n] = c
- n++
-
- return append([]byte(nil), out[:n]...)
-}