jinhr9801 / filename-extension-signature

Find out the file type by file data or name. Get extension from filename. Confirm filename extension by file signature. Check file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File Type | Signature | Magic Number

Find out the file type by file data or name

This library implements:

  1. Get filename extension from file path

  2. Confirm filename extension by file signature

    Now support:

    .PDF .ZIP .RAR .ISO

    .JPEG .JPG .PNG .WEBP .GIF .TIFF .BMP .ICO .J2K .JP2 .EPS .PSD .PSB

    .M4A .M4B .M4P .M4V .MOV

    .MP4 .MP3 .MP2

    .WAV .AVI .AIFF .MID .FLAC .APE .RM .RMVB

    .EXE

    .TXT .HTML

    .DOC .DOCX .PPT .PPTX .XML .XMLX

    .SVG .DIB .TGA

    .WMA .WMV .ASF

Reference: https://www.filesignatures.net/ http://www.ftyps.com/ http://www.nationalarchives.gov.uk/PRONOM/Format/proFormatSearch.aspx?status=new

About

Find out the file type by file data or name. Get extension from filename. Confirm filename extension by file signature. Check file format.

License:MIT License


Languages

Language:C 100.0%