Hiroshi Miura <miur...@linux.com> added the comment:
Here is a BCJ only CFFI test project. https://github.com/miurahr/bcj-cffi It imports two bcj_x86 C sources, one is from liblzma (src/xz_bcj_x86.c) taht is bind with python's lzma module, and the other is from xz-embbed project for linux kernel.(src/xz_simple_bcj.c) We can observe that 1. it has an interface which overwrite buffer 2. it returns good resulted buffer (digest assertion) in both case 3. it returns 4 bytes less size than expected. for 3, it is because return value of BCJ is defined such as ``` size -= 4; for (i = 0; i < size; ++i) {...} return i; ``` and variable i sometimes increment 4 bytes when target sequence is found and processed. It may be natural that a size value returned from BCJ filter is often 4 bytes smaller than actual. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41210> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com