- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for randomizeBytes (0.08 sec)
-
cmd/test-utils_test.go
if seed != -1 { rand.Seed(seed) } return rand.Intn(max-min) + min } // Randomizes the order of bytes in the byte array // using Knuth Fisher-Yates shuffle algorithm. func randomizeBytes(s []byte, seed int64) []byte { // special value -1 means no explicit seeding. if seed != -1 { rand.Seed(seed) } n := len(s) var j int for i := 0; i < n-1; i++ { j = i + rand.Intn(n-i)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/server_test.go
} // String content which is used for put object range test. putBytes := buffer.Bytes() putBytes = putBytes[:randInt] // randomize the order of bytes in the byte array and create a reader. putBytes = randomizeBytes(putBytes, -1) buf := bytes.NewReader(putBytes) putContent := string(putBytes) objectName := "test-big-file" // HTTP request to upload the object.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 15 16:28:02 UTC 2024 - 116.3K bytes - Viewed (0)