Change-Id: I16c17e322c757c8c657364065948d7cec66a8346
GitHub-Last-Rev:
9a5104fe9874dd7c604c526be3f082487f2aaf01
GitHub-Pull-Request: golang/go#66377
Reviewed-on: https://go-review.googlesource.com/c/go/+/572199
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Auto-Submit: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
repeatPower := 0
// The `C' array (used by the inverse BWT) needs to be zero initialized.
- for i := range bz2.c {
- bz2.c[i] = 0
- }
+ clear(bz2.c[:])
decoded := 0 // counts the number of symbols decoded by the current tree.
for {
type devZero struct{}
func (devZero) Read(p []byte) (int, error) {
- for i := range p {
- p[i] = 0
- }
+ clear(p)
return len(p), nil
}