Releases: gabriel-vasile/mimetype
v1.4.6
What's Changed
- Improve ftyp detection in #564
- CSV/TSV use a pool of buffered readers to avoid allocs by in #573
- feat: Add parquet file detection by @kwkelly in #578
- add application/xml as alias of text/xml in #581
- retract v1.4.4; closes #575 in #591
- action for benchmarking detectors in #590
- Remove GPL file by @canadacow in #583
New Contributors
- @kwkelly made their first contribution in #578
- @canadacow made their first contribution in #583
Full Changelog: v1.4.5...v1.4.6
v1.4.5
What's Changed
- json: improve performance by using a pool of scanners in #535
- tar: remove strconv dependency for tar checksum octal numbers in #536
- zip: use []byte instead of string to prevent allocs in #537
- remove tarbomb from testdata folder in #540
- Updating RTF Magic number to match https://www.iana.org/assignments/media-types/application/rtf by @zdiff in #544
- alias text/rtf to application/rtf in #547
- reduce project size by moving mimetype.gif to testdata in #548
- Bump golang.org/x/net from 0.25.0 to 0.27.0 in the gomod group across 1 directory by @dependabot in #552
- remove exe from testdata in #561
New Contributors
Full Changelog: v1.4.4...v1.4.5
v1.4.4
What's Changed
Security fixes:
Update golang.org/x/net
to latest. Fixes: CVE-2023-45288
Performance improvements:
- Change tar detection to use checksum instead of legal ranges of values in #466
- ftyp: exit asap to prevent mem allocs in #517
- Improve x-subrip detection performance in #524
- improve performance for text detection in #532
- Using io.ReadAll instead of ioutil.ReadAll by @phihungtf in #525
Benchmarks:
before:
BenchmarkText/application/x-ndjson-8 663314 2027 ns/op 4306 B/op 6 allocs/op
BenchmarkSliceRand-8 688160 1690 ns/op 728 B/op 75 allocs/op
BenchmarkSrt-8 946042 1089 ns/op 4240 B/op 5 allocs/op
after:
BenchmarkText/application/x-ndjson-8 1930292 678.6 ns/op 160 B/op 4 allocs/op
BenchmarkSliceRand-8 1232066 1173 ns/op 160 B/op 4 allocs/op
BenchmarkSrt-8 3235448 368.8 ns/op 64 B/op 2 allocs/op
New Contributors
- @phihungtf made their first contribution in #525
Full Changelog: v1.4.3...v1.4.4
v1.4.3
What's Changed
- Switch csv and tsv method 'sv' from ReadAll() to stream each record with Read() by @splashing-atom in #355
- Bump golang.org/x/net from 0.8.0 to 0.17.0 by @dependabot in #441
- enable reusing records in csv/tsv detection by @gabriel-vasile in #443
New Contributors
- @splashing-atom made their first contribution in #355
Full Changelog: v1.4.2...v1.4.3
v1.4.2
What's Changed
- Improve mov detection; closes #302 by @gabriel-vasile in #304
- [codespell] Fix typos. by @mdosch in #303
- Detect UStar tar archives by @chrisnovakovic in #308
- add jxr support #155 by @dijotmathews in #312
- Added support for JXS file format by @V-R-Dighe in #319
- Bump golang.org/x/net from 0.7.0 to 0.8.0 by @dependabot in #367
New Contributors
- @mdosch made their first contribution in #303
- @chrisnovakovic made their first contribution in #308
- @dijotmathews made their first contribution in #312
- @V-R-Dighe made their first contribution in #319
Full Changelog: v1.4.1...v1.4.2
v1.4.2-rc1
What's Changed
- Improve mov detection; closes #302 by @gabriel-vasile in #304
- [codespell] Fix typos. by @mdosch in #303
- Detect UStar tar archives by @chrisnovakovic in #308
- add jxr support #155 by @dijotmathews in #312
- Added support for JXS file format by @V-R-Dighe in #319
- Upgrade golang.org/x/net dependency by @gabriel-vasile in #365
New Contributors
- @mdosch made their first contribution in #303
- @chrisnovakovic made their first contribution in #308
- @dijotmathews made their first contribution in #312
- @V-R-Dighe made their first contribution in #319
Full Changelog: v1.4.1...v1.4.2-rc1
v1.4.1
What's Changed
Security fixes
- Update dependency for CVE-2021-33194 by @gabriel-vasile in #298
New detected formats
- Add support for AVIF still and animated by @gabriel-vasile in #210
- Add support for SubRip by @joksas in #232
- Add support for WebVTT by @joksas in #223
- Add APNG support. For #233 by @gabriel-vasile in #245
- Add support for .ttc font collection by @dhanusaputra in #249
- Add InstallShield Cabinet archive file (.cab) support by @ysyrota in #274
- add support for application/vnd.shp and application/vnd.shx by @AliAkberAakash in #297
Bug fixes
- Update added support for big excel files by @ThomasObenaus in #191
- Fix JSON returned for partial documents when readLimit=0 by @gabriel-vasile in #199
- limit max nesting depth by @gabriel-vasile in #206
- Limit marc field terminator search to first 2048 bytes by @gabriel-vasile in #217
- Require NdJSON to contain arrays and objects by @gabriel-vasile in #219
- Check for null bytes for Cabinet files by @gabriel-vasile in #218
- Fix svg detection when it starts with a comment by @vitorduarte in #193
- Fix detection for CFB files version 4 by @gabriel-vasile in #240
- Fix json detected as dbf when it starts with low ascii values by @gabriel-vasile in #241
- Improve TzIf format detection by @n-vr in #237
- Use CLSID for Office 97-2003 detection by @gabriel-vasile in #243
- More accurate detection for Shapefile by @dhanusaputra in #253
- add html utf8 bom signature by @napalu in #268
- Change python main type from application to text by @gabriel-vasile in #291
New Contributors
- @ThomasObenaus made their first contribution in #191
- @vitorduarte made their first contribution in #193
- @joksas made their first contribution in #232
- @n-vr made their first contribution in #237
- @dhanusaputra made their first contribution in #249
- @napalu made their first contribution in #268
- @ysyrota made their first contribution in #274
- @AliAkberAakash made their first contribution in #297
Full Changelog: v1.4.0...v1.4.1
v1.4.1-rc1
New Detected Formats
.png, image/vnd.mozilla.apng
.ttc, font/collection
.avif, image/avif
.srt, application/x-subrip, alias: application/x-srt, text/x-srt
.vtt, text/vtt
What's Changed
- Update added support for big excel files by @ThomasObenaus in #191
- Fix JSON returned for partial documents when readLimit=0 by @gabriel-vasile in #199
- limit max nesting depth by @gabriel-vasile in #206
- Remove 10 headers limit for Jar check by @gabriel-vasile in #208
- Add support for AVIF still and animated by @gabriel-vasile in #210
- Add 2 missing aliases: audio/x-aiff and application/x-lzip by @gabriel-vasile in #216
- Limit marc field terminator search to first 2048 bytes by @gabriel-vasile in #217
- Require NdJSON to contain arrays and objects by @gabriel-vasile in #219
- Check for null bytes for Cabinet files by @gabriel-vasile in #218
- Test for WARC version 1.0 and 1.1 by @gabriel-vasile in #220
- Fix svg detection when it starts with a comment by @vitorduarte in #193
- Add support for SubRip by @joksas in #232
- Add support for WebVTT by @joksas in #223
- Fix detection for CFB files version 4 by @gabriel-vasile in #240
- Fix json detected as dbf when it starts with low ascii values by @gabriel-vasile in #241
- Improve TzIf format detection by @n-vr in #237
- Use CLSID for Office 97-2003 detection by @gabriel-vasile in #243
- Add APNG support. For #233 by @gabriel-vasile in #245
- Improve tar signature to detect v7 archives by @gabriel-vasile in #247
- Add support for .ttc font collection by @dhanusaputra in #249
- Add html utf8 bom signature by @napalu in #268
- Make BOM have priority over HTML meta in charset detection by @napalu in #268 (comment)
New Contributors
- @ThomasObenaus made their first contribution in #191
- @vitorduarte made their first contribution in #193
- @joksas made their first contribution in #232
- @n-vr made their first contribution in #237
- @dhanusaputra made their first contribution in #249
- @napalu made their first contribution in #268
Full Changelog: v1.4.0...v1.4.1-rc1
v1.4.0
Features:
- support for 3 new formats: .msi, .har, .jxl; #182, #174, #154
- possibility to Extend individual MIME nodes #158
Fixes:
- exclude weird control characters from valid UTF8 #186
- rename x-sqlite3 to vnd.sqlite3 #170
- single JSON value are no longer detected as JSON #175
- fix vint-width parsing in matroska #185
Thank you for your contributions @ne1llee, @waybackarchiver, @jonsneyers, @sigma, @anthonyfok, @dennisstritzke, @IevgenLuzan, @Kycklingar.
Fix EOF returned for empty readers
v1.2.0 introduced a change where error EOF was returned for empty readers.
Previously, text/plain
would be returned for such an input.
v1.3.1 comes back to the pre-v1.2.0 behavior.