While porting the packed item code, I noticed that the encoded serial numbers differed slightly to those generated by the game. If you decode and then re-encode a serail number where the number of packed data bits is not a multiple of 8, the remaining bits of that last byte are not getting set to 1 as part of the padding step when generating the crc32 checksum.
This won't corrupt the packed item at all, but it may result in a different serial number / checksum whenever that item is touched. If you do account for the ignored bits, you should then get 1:1 accurate serial numbers with how the game generates them.
BL2(hwAAAACeowCEZgI/ChEIsGIYxBCA4QDDIYb///////+3YoDFQInh)
|
padding = b"\xff" * (33 - len(item)) |
While porting the packed item code, I noticed that the encoded serial numbers differed slightly to those generated by the game. If you decode and then re-encode a serail number where the number of packed data bits is not a multiple of 8, the remaining bits of that last byte are not getting set to 1 as part of the padding step when generating the crc32 checksum.
This won't corrupt the packed item at all, but it may result in a different serial number / checksum whenever that item is touched. If you do account for the ignored bits, you should then get 1:1 accurate serial numbers with how the game generates them.
borderlands2/borderlands/datautil/common.py
Line 80 in 85a2275