file-type icon indicating copy to clipboard operation
file-type copied to clipboard

Support: lz4 and avro file-types

Open jmealo opened this issue 4 years ago • 3 comments
trafficstars

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

jmealo avatar Mar 29 '21 14:03 jmealo

just tested on 7-zip, its lz4s start with 502a 4d18 instead of 0422 4d18

somebody1234 avatar Oct 20 '22 21:10 somebody1234

I've opened up a PR for the avro file type support: https://github.com/sindresorhus/file-type/pull/597

IgorWiecz avatar Apr 27 '23 09:04 IgorWiecz

lz4 https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md 4 Bytes, Little endian format. Value : 0x184D2204

IgorWiecz avatar Jun 01 '23 14:06 IgorWiecz