initNewEncode can be used to reset offsets and encoders to the initial state.
()
| 75 | |
| 76 | // initNewEncode can be used to reset offsets and encoders to the initial state. |
| 77 | func (b *blockEnc) initNewEncode() { |
| 78 | b.recentOffsets = [3]uint32{1, 4, 8} |
| 79 | b.litEnc.Reuse = huff0.ReusePolicyNone |
| 80 | b.coders.setPrev(nil, nil, nil) |
| 81 | b.dictLitEnc = nil |
| 82 | } |
| 83 | |
| 84 | // reset will reset the block for a new encode, but in the same stream, |
| 85 | // meaning that state will be carried over, but the block content is reset. |
no test coverage detected