TypeScript & MPEG-TS both use the `.ts` file extension.
Ideally, you'd be able to differentiate them with something like
first-64-bytes:ascii-content:FFmpegUnfortunately,
ascii-content:first-XX-bytes:first-XX-bytes:Suggestions:
- Add support for the family of functions to combine with other functions.
first-XX-bytes:
ie: ignore-case, ansi-content, ascii-content, text-content, regex, ..., etc. - Add ,
first-1k-bytes:, &first-2k-bytes:to the `first-XX-bytes:` function family.first-4k-bytes:- Little to no performance impact. Window's standard Allocation Unit Size is 4kb. So I believe each read operation (which takes orders of magnitude more time time than doing the compares) is always a 4kb block regardless if you're doing (1 compare),
first-byte:(naively 1 AVX256 compare), orfirst-64-bytes:(naively 16 AVX256 or 8 AVX512 compares).first-512-bytes: - I doubt every MPEG-TS file says "FFmpeg" in the first 64 bytes like in my example file below.
Therefore it would be nice to be able to scan to the metadata block which occurs in my example from byte 656 to 1383, for the word "MPEG".
Note: also to be able to throwin there. ie: something likeignore-case:.ignore-case:first-4k-bytes:ascii-content:MPEG
Or better yet, yeet the fast compare performance out the window & regex:
first-4k-bytes:regex:"\b((?i:MPEG-?4)|(?-i:(H\.?|x)264))\b"
. But figured it's probably easier for `first-xx-bytes:` to see the param is not hexadecimal so must be a function. At a glance the only functions that couldn't be combined in that fashion bcus valid hex areregex:first-4k-bytes:"\b((?i:MPEG-?4)|(?-i:(H\.?|x)264))\b"(shorthand date-accessed:) andda:(shorthand date-created:), and I can't imagine a scenario where you'd use them here anyway.dc:
Also becausepretty much has to have `ascii-content:` come last unless you require the param be quoted.ignore-case:first-4k-bytes:ascii-content:MPEG - Little to no performance impact. Window's standard Allocation Unit Size is 4kb. So I believe each read operation (which takes orders of magnitude more time time than doing the compares) is always a 4kb block regardless if you're doing