处理AI胡乱生成的乱摊子
This commit is contained in:
10
vendor/github.com/chenzhuoyu/base64x/base64x.go
generated
vendored
10
vendor/github.com/chenzhuoyu/base64x/base64x.go
generated
vendored
@@ -71,7 +71,7 @@ func (self Encoding) Encode(out []byte, src []byte) {
|
||||
//
|
||||
// It will also update the length of out.
|
||||
func (self Encoding) EncodeUnsafe(out *[]byte, src []byte) {
|
||||
__b64encode(out, &src, int(self) | archFlags)
|
||||
b64encode(out, &src, int(self) | archFlags)
|
||||
}
|
||||
|
||||
// EncodeToString returns the base64 encoding of src.
|
||||
@@ -120,7 +120,7 @@ func (self Encoding) Decode(out []byte, src []byte) (int, error) {
|
||||
//
|
||||
// It will also update the length of out.
|
||||
func (self Encoding) DecodeUnsafe(out *[]byte, src []byte) (int, error) {
|
||||
if n := __b64decode(out, mem2addr(src), len(src), int(self) | archFlags); n >= 0 {
|
||||
if n := b64decode(out, mem2addr(src), len(src), int(self) | archFlags); n >= 0 {
|
||||
return n, nil
|
||||
} else {
|
||||
return 0, base64.CorruptInputError(-n - 1)
|
||||
@@ -149,9 +149,3 @@ func (self Encoding) DecodedLen(n int) int {
|
||||
return n * 6 / 8
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
if hasAVX2() {
|
||||
archFlags = _MODE_AVX2
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user