PackageTrack
Sign in Get early access

mime2extension

A Flutter package for converting between MIME types and file extensions with wildcard support and base64 file type detection via magic bytes.

0.0.5 3.0K downloads/mo #4649 most downloaded on pub.dev tidu090/mime2extension

What this package is like to depend on

Last release 5 months ago

10 Mar 2026

Too new to tell

only 2 release windows

Nearly every release is documented

notes for 5 of 5 stable releases

Nothing withdrawn

no release was ever pulled

9 months old

5 releases · first in 2025

5 releases in the last 12 months

see the full history below

Release timeline

5 releases · Nov 2025 to Mar 2026
2026
Release Pre-release

Releases

latest 5
  1. 0.0.5 10 Mar 2026
    Release notes

    Added

    • OLE2 Compound Binary Format sub-format detection — differentiates DOC, XLS, PPT by scanning for UTF-16LE directory entry stream names (Workbook, Book, PowerPoint Document, WordDocument)
    • 10 new unit tests for OLE2 detection (total: 66 tests)
    Open source →
  2. 0.0.4 10 Mar 2026
    Release notes

    Added

    • base64ToExtension(String base64Data) — detect file extension from base64-encoded data using magic bytes
    • base64ToMime(String base64Data) — detect MIME type from base64-encoded data
    • Magic bytes database with 400+ file signatures covering images, audio, video, documents, archives, fonts, executables, and more
    • Smart RIFF container detection — differentiates WEBP, AVI, WAV, CDA, QCP, RMI, ANI, CMX, CDR
    • Smart ISO BMFF (ftyp) container detection — differentiates MP4, MOV, HEIC, AVIF, M4A, M4V, 3GP, 3G2, HEIF
    • Automatic data URI prefix stripping (data:...;base64, handled transparently)
    • 42 new unit tests for base64 detection (total: 56 tests)
    • Missing common file signatures: WASM, JPEG XL, RAR5, ZSTD, LZ4
    Open source →
  3. 0.0.3 20 Nov 2025
    Release notes

    Changed

    • Add example
    Open source →
  4. 0.0.2 20 Nov 2025
    Release notes

    Changed

    • Updated LICENSE to BSD-3-Clause (Flutter Authors)
    • Added repository and homepage URLs to pubspec.yaml
    • Updated GitHub repository references
    Open source →
  5. 0.0.1 20 Nov 2025
    Release notes

    Added

    • Initial release of mime2extension package
    • extension2Mime(String extension) function to convert file extensions to MIME types
    • mime2Extension(List<String> mimeTypes) function to convert MIME types to file extensions
    • Wildcard support for MIME type queries (e.g., application/* returns all application extensions)
    • Comprehensive MIME type database with 6000+ entries from IANA, Apache, and nginx sources
    • Support for all major file categories:
      • Application types (836 extensions)
      • Image types (png, jpg, gif, svg, etc.)
      • Audio types (mp3, wav, ogg, etc.)
      • Video types (mp4, avi, mkv, etc.)
      • Text types (txt, html, css, etc.)
      • Font types (ttf, otf, woff, etc.)
    • Automatic duplicate removal in results
    • Null-safe API with proper error handling
    • Comprehensive unit test suite (14 tests)
    • Example file demonstrating all features
    • Full documentation with usage examples

    Features

    • Zero external dependencies (Flutter SDK only)
    • Type-safe implementation
    • Efficient lookup using Map data structures
    • Support for multiple MIME types in a single query
    • Combines exact matches and wildcard patterns
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive