filetype.py icon indicating copy to clipboard operation
filetype.py copied to clipboard

xls files need 521 bytes

Open vgambier-altus opened this issue 1 year ago • 1 comments

The documentation says to pass the first 261/262 bytes. However, after some testing, it seems that for .xls files, 261 bytes is not enough. Passing 520 bytes is not enough either. Passing 521 bytes is enough, and .xls files are correctly identified as .xls files.

This issue does not affect .xlsx files, which are correctly identified with only 261 bytes.

I'm not sure if this is a documentation issue or an implementation issue.

vgambier-altus avatar Apr 10 '24 13:04 vgambier-altus

readme is outdated, filetype.py reads 8192 bytes and should detect xls and xlsx files https://github.com/h2non/filetype.py/commit/b71bf1731ec2f1155a94787373dad6eea77c7c65

CatKasha avatar Apr 28 '24 22:04 CatKasha