summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-02 16:42:51 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-02 16:42:51 +0100
commit8488ac928651656c6f7bebf5eaabce62c2b9fb66 (patch)
tree94357311026e5ed96862a647400375a4543dd815 /vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go
parent[chore] go-swagger -> codeberg (#3856) (diff)
downloadgotosocial-8488ac928651656c6f7bebf5eaabce62c2b9fb66.tar.xz
[chore] migrate oauth2 -> codeberg (#3857)
Diffstat (limited to 'vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go')
-rw-r--r--vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go42
1 files changed, 42 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go b/vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go
new file mode 100644
index 000000000..0cfb5c0e2
--- /dev/null
+++ b/vendor/github.com/klauspost/compress/internal/le/unsafe_disabled.go
@@ -0,0 +1,42 @@
+//go:build !(amd64 || arm64 || ppc64le || riscv64) || nounsafe || purego || appengine
+
+package le
+
+import (
+ "encoding/binary"
+)
+
+// Load8 will load from b at index i.
+func Load8[I Indexer](b []byte, i I) byte {
+ return b[i]
+}
+
+// Load16 will load from b at index i.
+func Load16[I Indexer](b []byte, i I) uint16 {
+ return binary.LittleEndian.Uint16(b[i:])
+}
+
+// Load32 will load from b at index i.
+func Load32[I Indexer](b []byte, i I) uint32 {
+ return binary.LittleEndian.Uint32(b[i:])
+}
+
+// Load64 will load from b at index i.
+func Load64[I Indexer](b []byte, i I) uint64 {
+ return binary.LittleEndian.Uint64(b[i:])
+}
+
+// Store16 will store v at b.
+func Store16(b []byte, v uint16) {
+ binary.LittleEndian.PutUint16(b, v)
+}
+
+// Store32 will store v at b.
+func Store32(b []byte, v uint32) {
+ binary.LittleEndian.PutUint32(b, v)
+}
+
+// Store64 will store v at b.
+func Store64(b []byte, v uint64) {
+ binary.LittleEndian.PutUint64(b, v)
+}