Notes |
|
|
Is it possible to call the BitStream_Init() function before starting the encoding process?
Please note that this was a design choice. It is much more efficient to call BitStream_Init at the beginning to zero the output buffer instead of writing bit zeros in every call BitStream_AppendByte() and BitStream_AppendPartialByte() |
|
|
(0003664)
|
shd01
|
2019-11-07 08:31
|
|
Ah, I see. I can call the BitStream_Init(). |
|
|
(0003666)
|
shd01
|
2019-11-07 08:49
|
|
But I don't think that zeroing during write is particularly inefficent. Every byte is already accessed at least once, so instead of doing:
a) buf[i] = buf[i] | newbits
you could do:
b) buf[i] = (buf[i] & mask) | newbits
I think you'd be hard-pressed to notice an efficiency difference between the two. |
|
|
|
You are right. There should no actual difference between the two. It will be implemented the way you propose. |
|
|
|
fixed in latest GitHub commit (version 4.2.0.7) |
|