]> Cypherpunks repositories - gostls13.git/commit
compress/bzip2: simplify Huffman tree construction
authoraimuz <mr.imuz@gmail.com>
Sun, 14 Apr 2024 08:45:12 +0000 (08:45 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 15 Apr 2024 17:44:37 +0000 (17:44 +0000)
commitb107d95b9a66bfe7150fd4f2915e9bb876a6999a
treeda711368e9cffd6a98a0d35e4886c6a2d5cf377c
parentf7f56ded0179cd27f21afdd09014a51795db6419
compress/bzip2: simplify Huffman tree construction

This change simplifies the construction of the Huffman tree in the
bzip2 package by replacing custom sort logic with the more concise and
idiomatic use of "slices" and "cmp" packages.

Change-Id: I2a8aef146b54b9433038b133d2cc8856ba077c72
GitHub-Last-Rev: c031bb56635552205c12b87add5f4337a7def74f
GitHub-Pull-Request: golang/go#66817
Reviewed-on: https://go-review.googlesource.com/c/go/+/578438
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/compress/bzip2/huffman.go