Skip to content

Commit

Permalink
Remove old crc slice.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Dec 3, 2024
1 parent 6e4de97 commit ccf9ad5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions api-put-object-streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func (c *Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, b

// Create checksums
// CRC32C is ~50% faster on AMD64 @ 30GB/s
var crcBytes []byte
customHeader := make(http.Header)
crc := opts.AutoChecksum.Hasher()
md5Hash := c.md5Hasher()
Expand Down Expand Up @@ -377,7 +376,6 @@ func (c *Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, b
crc.Write(buf[:length])
cSum := crc.Sum(nil)
customHeader.Set(opts.AutoChecksum.KeyCapitalized(), base64.StdEncoding.EncodeToString(cSum))
crcBytes = append(crcBytes, cSum...)
}

// Update progress reader appropriately to the latest offset
Expand Down
2 changes: 1 addition & 1 deletion utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ func TestFullObjectChecksum64(t *testing.T) {
want := sum(b)
var parts []ObjectPart
for len(b) > 0 {
sz := len(b) / 2
sz := rng.Intn(len(b) / 2)
if len(b)-sz < 1024 {
sz = len(b)
}
Expand Down

0 comments on commit ccf9ad5

Please sign in to comment.