Skip to content

AkagiYui/FormatDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FormatDetector

release pypi support-version license commit

A python library that can easily find out the real format of a binary file with a common format.

可以轻松找到一个常见格式的二进制文件的真实格式。

The result of the finder may be wrong, please be careful.

这个工具返回的结果可能是错误的,请谨慎使用。

If you find any bug or mistake, please report it in issues.

如果你发现了任何 bug 或者错误,请在 issues 中告诉我。

Install 安装

pip install formatdetector

Usage 使用

from formatdetector import get_file_format

get_file_format('xxx.zip')  # ['zip', 'jar', 'apk', 'xapk']
get_file_format('fff.mp3')  # ['ogg'] # so the 'mp3' tag may be wrong
get_file_format('hhh')  # ['rar'] # now you find out the real format of the file with no extension name

Thanks 致谢

python3通过文件头判断文件类型

About

A library that can easily find out the format of a binary file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages