Closed rgaudin closed 2 years ago
This is due to 32-bit overflow: 1910077255 == 2**32 - 2384890041
The return type of zim::Archive::getFilesize()
is zim::size_type
which is a 64-bit unsigned integer:
Thus the narrowing of the integer type occurs in libzim.pyx
This is indeed in python wrapper.
getFileSize (https://github.com/openzim/python-libzim/blob/master/libzim/zim.pxd#L134) should be declared as
uint64_t getFilesize() except +
First iFixIt ZIM file is 2.22GiB large.
When retrieving libzim-returned filesize via (
getFileSize()
) I get-1910077255
which is negative 🤨 and even it's absolute value is incorrect: 1910077255b is 1.78 GiB.Note: I am using python-libzim to access this information so the possibility of a wrapper bug exists although it looks straigghtforward