Skip to content

Commit 39fef59

Browse files
committed
change casing
1 parent 66bc805 commit 39fef59

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dictionary.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (d *Dictionary) constructTree(frequencyTable [MaxSymbols]uint32) {
136136
n.Leafs[1] = 0xffff
137137

138138
ns = &nodesLeftStorage[i]
139-
if i == EOFSymbol {
139+
if i == EofSymbol {
140140
ns.frequency = 1
141141
} else {
142142
ns.frequency = frequencyTable[i]

huffman.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
)
66

77
const (
8-
EOFSymbol = 256
9-
MaxSymbols = EOFSymbol
8+
EofSymbol = 256
9+
MaxSymbols = EofSymbol
1010
)
1111

1212
type Huffman struct {
@@ -32,7 +32,7 @@ func (huff *Huffman) Decompress(data []byte) ([]byte, error) {
3232
size := len(data)
3333
bits := uint32(0)
3434
bitcount := uint8(0)
35-
eof := &huff.nodes[EOFSymbol]
35+
eof := &huff.nodes[EofSymbol]
3636
var n *node
3737

3838
for {
@@ -124,8 +124,8 @@ func (huff *Huffman) Compress(data []byte) ([]byte, error) {
124124
bitcount -= 8
125125
}
126126

127-
bits |= huff.nodes[EOFSymbol].Bits << bitcount
128-
bitcount += huff.nodes[EOFSymbol].NumBits
127+
bits |= huff.nodes[EofSymbol].Bits << bitcount
128+
bitcount += huff.nodes[EofSymbol].NumBits
129129
for bitcount >= 8 {
130130
dst = append(dst, byte(bits&0xff))
131131
bits >>= 8

0 commit comments

Comments
 (0)