1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:37:44 +00:00

LibCore: Implement basic mime type guessing based on binary patterns

This attempts to guess the mime-type from a given set of bytes from the
start of a file. It only supports a few well-defined patterns for now,
but it's a start!
This commit is contained in:
Valtteri Koskivuori 2021-05-03 21:48:21 +03:00 committed by Linus Groh
parent 1069979ddf
commit cf5f3a9874
2 changed files with 33 additions and 0 deletions

View file

@ -49,4 +49,6 @@ private:
String guess_mime_type_based_on_filename(const StringView&);
Optional<String> guess_mime_type_based_on_sniffed_bytes(const ReadonlyBytes&);
}