package
Version:
v1.2.0
Opens a new window with list of versions in this module.
Published: May 11, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 22
Opens a new window with list of known importers.
README
¶
goos: linux
goarch: amd64
BenchmarkIsZeroFilled/size_0/default-8 1000000000 3.03 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_0/simple-8 1000000000 2.93 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_1/default-8 1000000000 4.74 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_1/simple-8 1000000000 3.31 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_256/default-8 212255557 28.4 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_256/simple-8 71001369 86.8 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_65536/default-8 1466428 3961 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_65536/simple-8 308932 19780 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_1048576/default-8 106068 65791 ns/op 0 B/op 0 allocs/op
BenchmarkIsZeroFilled/size_1048576/simple-8 17924 335547 ns/op 0 B/op 0 allocs/op
PASS
ok _/home/xaionaro/go/src/github.com/9elements/converged-security-suite/v2/cmd/pcr0tool/pkg/bytes 63.711s
Documentation
¶
IsZeroFilled returns true if b consists of zeros only.
Range defines is a generic bytes range headers.
End returns the first offset after the range.
Exclude returns the parts of the range, which excludes the selected ones.
Intersect returns True if ranges "r" and "cmp" has at least
one byte with the same offset.
Ranges is a helper to manipulate multiple `Range`-s at once
MergeRanges just merges ranges which has distance less or equal to
mergeDistance.
Warning: should be called only on sorted ranges!
Compile returns the bytes from `b` which are referenced by `Range`-s `s`.
IsIn returns if the index is covered by this ranges
Sort sorts the slice by field Offset
func (s *Ranges) SortAndMerge()
SortAndMerge sorts the slice (by field Offset) and the merges ranges
which could be merged.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.