mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/gin-contrib/sessions from 0.0.5 to 1.0.0 (#2782)
This commit is contained in:
22
vendor/github.com/klauspost/compress/s2/encode_all.go
generated
vendored
22
vendor/github.com/klauspost/compress/s2/encode_all.go
generated
vendored
@ -117,6 +117,12 @@ func encodeBlockGo(dst, src []byte) (d int) {
|
||||
i--
|
||||
base--
|
||||
}
|
||||
|
||||
// Bail if we exceed the maximum size.
|
||||
if d+(base-nextEmit) > dstLimit {
|
||||
return 0
|
||||
}
|
||||
|
||||
d += emitLiteral(dst[d:], src[nextEmit:base])
|
||||
|
||||
// Extend forward
|
||||
@ -152,7 +158,6 @@ func encodeBlockGo(dst, src []byte) (d int) {
|
||||
if s >= sLimit {
|
||||
goto emitRemainder
|
||||
}
|
||||
|
||||
cv = load64(src, s)
|
||||
continue
|
||||
}
|
||||
@ -325,6 +330,11 @@ func encodeBlockSnappyGo(dst, src []byte) (d int) {
|
||||
i--
|
||||
base--
|
||||
}
|
||||
// Bail if we exceed the maximum size.
|
||||
if d+(base-nextEmit) > dstLimit {
|
||||
return 0
|
||||
}
|
||||
|
||||
d += emitLiteral(dst[d:], src[nextEmit:base])
|
||||
|
||||
// Extend forward
|
||||
@ -532,6 +542,11 @@ searchDict:
|
||||
i--
|
||||
base--
|
||||
}
|
||||
// Bail if we exceed the maximum size.
|
||||
if d+(base-nextEmit) > dstLimit {
|
||||
return 0
|
||||
}
|
||||
|
||||
d += emitLiteral(dst[d:], src[nextEmit:base])
|
||||
if debug && nextEmit != base {
|
||||
fmt.Println("emitted ", base-nextEmit, "literals")
|
||||
@ -880,6 +895,11 @@ searchDict:
|
||||
i--
|
||||
base--
|
||||
}
|
||||
// Bail if we exceed the maximum size.
|
||||
if d+(base-nextEmit) > dstLimit {
|
||||
return 0
|
||||
}
|
||||
|
||||
d += emitLiteral(dst[d:], src[nextEmit:base])
|
||||
if debug && nextEmit != base {
|
||||
fmt.Println("emitted ", base-nextEmit, "literals")
|
||||
|
108
vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s
generated
vendored
108
vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s
generated
vendored
@ -100,6 +100,15 @@ repeat_extend_back_loop_encodeBlockAsm:
|
||||
JNZ repeat_extend_back_loop_encodeBlockAsm
|
||||
|
||||
repeat_extend_back_end_encodeBlockAsm:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 5(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeBlockAsm
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeBlockAsm:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeBlockAsm
|
||||
@ -1513,6 +1522,15 @@ repeat_extend_back_loop_encodeBlockAsm4MB:
|
||||
JNZ repeat_extend_back_loop_encodeBlockAsm4MB
|
||||
|
||||
repeat_extend_back_end_encodeBlockAsm4MB:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 4(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeBlockAsm4MB
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeBlockAsm4MB:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeBlockAsm4MB
|
||||
@ -2828,6 +2846,15 @@ repeat_extend_back_loop_encodeBlockAsm12B:
|
||||
JNZ repeat_extend_back_loop_encodeBlockAsm12B
|
||||
|
||||
repeat_extend_back_end_encodeBlockAsm12B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeBlockAsm12B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeBlockAsm12B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeBlockAsm12B
|
||||
@ -3903,6 +3930,15 @@ repeat_extend_back_loop_encodeBlockAsm10B:
|
||||
JNZ repeat_extend_back_loop_encodeBlockAsm10B
|
||||
|
||||
repeat_extend_back_end_encodeBlockAsm10B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeBlockAsm10B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeBlockAsm10B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeBlockAsm10B
|
||||
@ -4978,6 +5014,15 @@ repeat_extend_back_loop_encodeBlockAsm8B:
|
||||
JNZ repeat_extend_back_loop_encodeBlockAsm8B
|
||||
|
||||
repeat_extend_back_end_encodeBlockAsm8B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeBlockAsm8B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeBlockAsm8B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeBlockAsm8B
|
||||
@ -10756,6 +10801,15 @@ repeat_extend_back_loop_encodeSnappyBlockAsm:
|
||||
JNZ repeat_extend_back_loop_encodeSnappyBlockAsm
|
||||
|
||||
repeat_extend_back_end_encodeSnappyBlockAsm:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 5(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeSnappyBlockAsm
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeSnappyBlockAsm:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeSnappyBlockAsm
|
||||
@ -11678,6 +11732,15 @@ repeat_extend_back_loop_encodeSnappyBlockAsm64K:
|
||||
JNZ repeat_extend_back_loop_encodeSnappyBlockAsm64K
|
||||
|
||||
repeat_extend_back_end_encodeSnappyBlockAsm64K:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeSnappyBlockAsm64K
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeSnappyBlockAsm64K:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeSnappyBlockAsm64K
|
||||
@ -12504,6 +12567,15 @@ repeat_extend_back_loop_encodeSnappyBlockAsm12B:
|
||||
JNZ repeat_extend_back_loop_encodeSnappyBlockAsm12B
|
||||
|
||||
repeat_extend_back_end_encodeSnappyBlockAsm12B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeSnappyBlockAsm12B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeSnappyBlockAsm12B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeSnappyBlockAsm12B
|
||||
@ -13330,6 +13402,15 @@ repeat_extend_back_loop_encodeSnappyBlockAsm10B:
|
||||
JNZ repeat_extend_back_loop_encodeSnappyBlockAsm10B
|
||||
|
||||
repeat_extend_back_end_encodeSnappyBlockAsm10B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeSnappyBlockAsm10B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeSnappyBlockAsm10B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeSnappyBlockAsm10B
|
||||
@ -14156,6 +14237,15 @@ repeat_extend_back_loop_encodeSnappyBlockAsm8B:
|
||||
JNZ repeat_extend_back_loop_encodeSnappyBlockAsm8B
|
||||
|
||||
repeat_extend_back_end_encodeSnappyBlockAsm8B:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_encodeSnappyBlockAsm8B
|
||||
MOVQ $0x00000000, ret+48(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_encodeSnappyBlockAsm8B:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_encodeSnappyBlockAsm8B
|
||||
@ -17949,6 +18039,15 @@ repeat_extend_back_loop_calcBlockSize:
|
||||
JNZ repeat_extend_back_loop_calcBlockSize
|
||||
|
||||
repeat_extend_back_end_calcBlockSize:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 5(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_calcBlockSize
|
||||
MOVQ $0x00000000, ret+24(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_calcBlockSize:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_calcBlockSize
|
||||
@ -18531,6 +18630,15 @@ repeat_extend_back_loop_calcBlockSizeSmall:
|
||||
JNZ repeat_extend_back_loop_calcBlockSizeSmall
|
||||
|
||||
repeat_extend_back_end_calcBlockSizeSmall:
|
||||
MOVL SI, BX
|
||||
SUBL 12(SP), BX
|
||||
LEAQ 3(AX)(BX*1), BX
|
||||
CMPQ BX, (SP)
|
||||
JB repeat_dst_size_check_calcBlockSizeSmall
|
||||
MOVQ $0x00000000, ret+24(FP)
|
||||
RET
|
||||
|
||||
repeat_dst_size_check_calcBlockSizeSmall:
|
||||
MOVL 12(SP), BX
|
||||
CMPL BX, SI
|
||||
JEQ emit_literal_done_repeat_emit_calcBlockSizeSmall
|
||||
|
21
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
21
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
@ -215,7 +215,7 @@ func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) {
|
||||
return 0, err
|
||||
}
|
||||
if len(w.ibuf) > 0 {
|
||||
err := w.Flush()
|
||||
err := w.AsyncFlush()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@ -225,7 +225,7 @@ func (w *Writer) ReadFrom(r io.Reader) (n int64, err error) {
|
||||
if err := w.EncodeBuffer(buf); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return int64(len(buf)), w.Flush()
|
||||
return int64(len(buf)), w.AsyncFlush()
|
||||
}
|
||||
for {
|
||||
inbuf := w.buffers.Get().([]byte)[:w.blockSize+obufHeaderLen]
|
||||
@ -354,7 +354,7 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) {
|
||||
}
|
||||
// Flush queued data first.
|
||||
if len(w.ibuf) > 0 {
|
||||
err := w.Flush()
|
||||
err := w.AsyncFlush()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -716,9 +716,9 @@ func (w *Writer) writeSync(p []byte) (nRet int, errRet error) {
|
||||
return nRet, nil
|
||||
}
|
||||
|
||||
// Flush flushes the Writer to its underlying io.Writer.
|
||||
// This does not apply padding.
|
||||
func (w *Writer) Flush() error {
|
||||
// AsyncFlush writes any buffered bytes to a block and starts compressing it.
|
||||
// It does not wait for the output has been written as Flush() does.
|
||||
func (w *Writer) AsyncFlush() error {
|
||||
if err := w.err(nil); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -738,6 +738,15 @@ func (w *Writer) Flush() error {
|
||||
}
|
||||
}
|
||||
}
|
||||
return w.err(nil)
|
||||
}
|
||||
|
||||
// Flush flushes the Writer to its underlying io.Writer.
|
||||
// This does not apply padding.
|
||||
func (w *Writer) Flush() error {
|
||||
if err := w.AsyncFlush(); err != nil {
|
||||
return err
|
||||
}
|
||||
if w.output == nil {
|
||||
return w.err(nil)
|
||||
}
|
||||
|
Reference in New Issue
Block a user