aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/ir.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-03 15:51:43 +0900
committerOphestra <cat@gensokyo.uk>2026-06-03 16:00:36 +0900
commit42cea1e7c6d1ea0658e6b4d2a1f12f98b9c0dd22 (patch)
tree5e04f8ff2ea2d32405c2a11fad3ea966bade27f3 /internal/pkg/ir.go
parent83498b5a8af4edc6e4f9408fec2d527c2be982a7 (diff)
internal/pkg: streaming archive reader/writer
This is much more robust and efficient than the simple buffering implementation for larger files. Allocations happen almost exclusively in WalkDir. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/ir.go')
-rw-r--r--internal/pkg/ir.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/pkg/ir.go b/internal/pkg/ir.go
index 366d9ca0..95bdddcb 100644
--- a/internal/pkg/ir.go
+++ b/internal/pkg/ir.go
@@ -21,7 +21,7 @@ import (
const wordSize = 8
// alignSize returns the padded size for aligning sz.
-func alignSize(sz int) int {
+func alignSize[T int | uint64](sz T) T {
return sz + (wordSize-(sz)%wordSize)%wordSize
}