mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.67 to 7.0.69 (#2748)
This commit is contained in:
14
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
14
vendor/github.com/klauspost/compress/s2/writer.go
generated
vendored
@ -13,6 +13,8 @@ import (
|
||||
"io"
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"github.com/klauspost/compress/internal/race"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -271,7 +273,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) {
|
||||
return fmt.Errorf("skippable block excessed maximum size")
|
||||
}
|
||||
var header [4]byte
|
||||
chunkLen := 4 + len(data)
|
||||
chunkLen := len(data)
|
||||
header[0] = id
|
||||
header[1] = uint8(chunkLen >> 0)
|
||||
header[2] = uint8(chunkLen >> 8)
|
||||
@ -282,7 +284,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) {
|
||||
if err = w.err(err); err != nil {
|
||||
return err
|
||||
}
|
||||
if n != len(data) {
|
||||
if n != len(b) {
|
||||
return w.err(io.ErrShortWrite)
|
||||
}
|
||||
w.written += int64(n)
|
||||
@ -303,9 +305,7 @@ func (w *Writer) AddSkippableBlock(id uint8, data []byte) (err error) {
|
||||
if err := write(header[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := write(data); err != nil {
|
||||
return err
|
||||
}
|
||||
return write(data)
|
||||
}
|
||||
|
||||
// Create output...
|
||||
@ -385,6 +385,8 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) {
|
||||
buf = buf[len(uncompressed):]
|
||||
// Get an output buffer.
|
||||
obuf := w.buffers.Get().([]byte)[:len(uncompressed)+obufHeaderLen]
|
||||
race.WriteSlice(obuf)
|
||||
|
||||
output := make(chan result)
|
||||
// Queue output now, so we keep order.
|
||||
w.output <- output
|
||||
@ -393,6 +395,8 @@ func (w *Writer) EncodeBuffer(buf []byte) (err error) {
|
||||
}
|
||||
w.uncompWritten += int64(len(uncompressed))
|
||||
go func() {
|
||||
race.ReadSlice(uncompressed)
|
||||
|
||||
checksum := crc(uncompressed)
|
||||
|
||||
// Set to uncompressed.
|
||||
|
Reference in New Issue
Block a user