file-type
file-type copied to clipboard
Support: lz4 and avro file-types
Hello, great work so far! Thanks for another great module :)
I tested with fromFile and fromStream and .lz4 and .avro files are not properly detected.
LZ4 Magic Number:
4 Bytes, Little endian format. Value : 0x184D2204
https://fuchsia.googlesource.com/third_party/lz4/+/HEAD/doc/lz4_Frame_format.md
AVRO Magic Number:
Four bytes, ASCII 'O', 'b', 'j', followed by 1
http://avro.apache.org/docs/current/spec.html#Object+Container+Files
just tested on 7-zip, its lz4s start with 502a 4d18 instead of 0422 4d18
I've opened up a PR for the avro file type support: https://github.com/sindresorhus/file-type/pull/597
lz4 https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md 4 Bytes, Little endian format. Value : 0x184D2204