Skip to content

Releases: gabriel-vasile/mimetype

v1.4.6

14 Oct 14:18
2998a94
Compare
Choose a tag to compare

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

Full Changelog: v1.4.5...v1.4.6

v1.4.5

26 Jul 07:29
b36b70f
Compare
Choose a tag to compare

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

24 May 06:51
43192c8
Compare
Choose a tag to compare

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

Full Changelog: v1.4.3...v1.4.4

v1.4.3

12 Oct 14:05
e64d6bd
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.4.2...v1.4.3

v1.4.2

08 Mar 14:02
6f575b3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.4.1...v1.4.2

v1.4.2-rc1

25 Feb 12:46
f976d45
Compare
Choose a tag to compare
v1.4.2-rc1 Pre-release
Pre-release

What's Changed

New Contributors

Full Changelog: v1.4.1...v1.4.2-rc1

v1.4.1

07 Jul 18:53
80fe766
Compare
Choose a tag to compare

What's Changed

Security fixes

New detected formats

Bug fixes

New Contributors

Full Changelog: v1.4.0...v1.4.1

v1.4.1-rc1

17 Apr 19:56
6e3aeb1
Compare
Choose a tag to compare
v1.4.1-rc1 Pre-release
Pre-release

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

New Contributors

Full Changelog: v1.4.0...v1.4.1-rc1

v1.4.0

11 Oct 19:46
2163896
Compare
Choose a tag to compare

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

01 Jul 07:33
Compare
Choose a tag to compare

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.