From baf03b81e36e3c5d8b9a370ebb82dd2b25b4a58d Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Thu, 8 Apr 2021 22:27:41 +0800 Subject: [PATCH] Fix: remove unused function --- component/gun/leb128.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/component/gun/leb128.go b/component/gun/leb128.go index 0546345..5978980 100644 --- a/component/gun/leb128.go +++ b/component/gun/leb128.go @@ -14,26 +14,6 @@ var sevenbits = [...]byte{ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, } -func decodeUleb128(b []byte) (u uint64, n uint8) { - l := uint8(len(b) & 0xff) - // The longest LEB128 encoded sequence is 10 byte long (9 0xff's and 1 0x7f) - // so make sure we won't overflow. - if l > 10 { - l = 10 - } - - var i uint8 - for i = 0; i < l; i++ { - u |= uint64(b[i]&0x7f) << (7 * i) - if b[i]&0x80 == 0 { - n = uint8(i + 1) - return - } - } - - return -} - func appendUleb128(b []byte, v uint64) []byte { // If it's less than or equal to 7-bit if v < 0x80 {