mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 21:02:26 -05:00
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.72 to 7.0.73 (#3083)
This commit is contained in:
parent
ae349dd6a5
commit
43c480aec4
44 changed files with 3889 additions and 245 deletions
10
vendor/github.com/klauspost/compress/s2/index.go
generated
vendored
10
vendor/github.com/klauspost/compress/s2/index.go
generated
vendored
|
|
@ -17,6 +17,8 @@ const (
|
|||
S2IndexHeader = "s2idx\x00"
|
||||
S2IndexTrailer = "\x00xdi2s"
|
||||
maxIndexEntries = 1 << 16
|
||||
// If distance is less than this, we do not add the entry.
|
||||
minIndexDist = 1 << 20
|
||||
)
|
||||
|
||||
// Index represents an S2/Snappy index.
|
||||
|
|
@ -72,6 +74,10 @@ func (i *Index) add(compressedOffset, uncompressedOffset int64) error {
|
|||
if latest.compressedOffset > compressedOffset {
|
||||
return fmt.Errorf("internal error: Earlier compressed received (%d > %d)", latest.uncompressedOffset, uncompressedOffset)
|
||||
}
|
||||
if latest.uncompressedOffset+minIndexDist > uncompressedOffset {
|
||||
// Only add entry if distance is large enough.
|
||||
return nil
|
||||
}
|
||||
}
|
||||
i.info = append(i.info, struct {
|
||||
compressedOffset int64
|
||||
|
|
@ -122,7 +128,7 @@ func (i *Index) Find(offset int64) (compressedOff, uncompressedOff int64, err er
|
|||
|
||||
// reduce to stay below maxIndexEntries
|
||||
func (i *Index) reduce() {
|
||||
if len(i.info) < maxIndexEntries && i.estBlockUncomp >= 1<<20 {
|
||||
if len(i.info) < maxIndexEntries && i.estBlockUncomp >= minIndexDist {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +138,7 @@ func (i *Index) reduce() {
|
|||
j := 0
|
||||
|
||||
// Each block should be at least 1MB, but don't reduce below 1000 entries.
|
||||
for i.estBlockUncomp*(int64(removeN)+1) < 1<<20 && len(i.info)/(removeN+1) > 1000 {
|
||||
for i.estBlockUncomp*(int64(removeN)+1) < minIndexDist && len(i.info)/(removeN+1) > 1000 {
|
||||
removeN++
|
||||
}
|
||||
for idx := 0; idx < len(src); idx++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue