diff options
Diffstat (limited to 'src/compress/bzip2')
-rw-r--r-- | src/compress/bzip2/bzip2.go | 8 | ||||
-rw-r--r-- | src/compress/bzip2/bzip2_test.go | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/compress/bzip2/bzip2.go b/src/compress/bzip2/bzip2.go index c40129b982..0d8c286c16 100644 --- a/src/compress/bzip2/bzip2.go +++ b/src/compress/bzip2/bzip2.go @@ -29,8 +29,8 @@ type reader struct { setupDone bool // true if we have parsed the bzip2 header. blockSize int // blockSize in bytes, i.e. 900 * 1000. eof bool - c [256]uint // the `C' array for the inverse BWT. - tt []uint32 // mirrors the `tt' array in the bzip2 source and contains the P array in the upper 24 bits. + c [256]uint // the ``C'' array for the inverse BWT. + tt []uint32 // mirrors the ``tt'' array in the bzip2 source and contains the P array in the upper 24 bits. tPos uint32 // Index of the next output byte in tt. preRLE []uint32 // contains the RLE data still to be processed. @@ -447,11 +447,11 @@ func (bz2 *reader) readBlock() (err error) { // inverseBWT implements the inverse Burrows-Wheeler transform as described in // http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-124.pdf, section 4.2. -// In that document, origPtr is called `I' and c is the `C' array after the +// In that document, origPtr is called ``I'' and c is the ``C'' array after the // first pass over the data. It's an argument here because we merge the first // pass with the Huffman decoding. // -// This also implements the `single array' method from the bzip2 source code +// This also implements the ``single array'' method from the bzip2 source code // which leaves the output, still shuffled, in the bottom 8 bits of tt with the // index of the next byte in the top 24-bits. The index of the first byte is // returned. diff --git a/src/compress/bzip2/bzip2_test.go b/src/compress/bzip2/bzip2_test.go index c432bb5226..98477791b3 100644 --- a/src/compress/bzip2/bzip2_test.go +++ b/src/compress/bzip2/bzip2_test.go @@ -133,7 +133,7 @@ func TestReader(t *testing.T) { for i, v := range vectors { rd := NewReader(bytes.NewReader(v.input)) - buf, err := ioutil.ReadAll(rd) + buf, err := io.ReadAll(rd) if fail := bool(err != nil); fail != v.fail { if fail { @@ -220,7 +220,7 @@ var ( func benchmarkDecode(b *testing.B, compressed []byte) { // Determine the uncompressed size of testfile. - uncompressedSize, err := io.Copy(ioutil.Discard, NewReader(bytes.NewReader(compressed))) + uncompressedSize, err := io.Copy(io.Discard, NewReader(bytes.NewReader(compressed))) if err != nil { b.Fatal(err) } @@ -231,7 +231,7 @@ func benchmarkDecode(b *testing.B, compressed []byte) { for i := 0; i < b.N; i++ { r := bytes.NewReader(compressed) - io.Copy(ioutil.Discard, NewReader(r)) + io.Copy(io.Discard, NewReader(r)) } } |