An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/gabriel-vasile/mimetype

Package mimetype uses magic number signatures to detect the MIME type of a file. File formats are stored in a hierarchy with application/octet-stream at its root. For example, the hierarchy for HTML format is application/octet-stream -> text/plain -> text/html. Pure io.Readers (meaning those without a Seek method) cannot be read twice. This means that once DetectReader has been called on an io.Reader, that reader is missing the bytes representing the header of the file. To detect the MIME type and then reuse the input, use a buffer, io.TeeReader, and io.MultiReader to create a new reader containing the original, unaltered data. If the input is an io.ReadSeeker instead, call input.Seek(0, io.SeekStart) before reusing it. Use Extend to add support for a file format which is not detected by mimetype. https://www.garykessler.net/library/file_sigs.html and https://github.com/file/file/tree/master/magic/Magdir have signatures for a multitude of file formats. Considering the definition of a binary file as "a computer file that is not a text file", they can differentiated by searching for the text/plain MIME in their MIME hierarchy.
50 versions
Latest release: over 1 year ago
11,932 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/gabriel-vasile/mimetype

Dependent Repos 4

snps-public/rest-samba-config
Rest API used to view (and maybe at some point edit) Samba configuration

Last synced: 7 months ago - Pushed: 11 months ago

tchapgouv/matrix-media-repo Fork of t2bot/matrix-media-repo
Matrix media repository with multi-domain in mind.

Size: 6.2 MB - Last synced: 6 days ago - Pushed: over 1 year ago

1024pix/data-processing-spark-submit Fork of ovh/data-processing-spark-submit
Spark CLI wrapper to run your jobs on OVHcloud Data Processing

Size: 81.1 KB - Last synced: 2 days ago - Pushed: 12 months ago

signaux-faibles/datapi
datAPI - API des applications web signaux-faibles

Size: 43.1 MB - Last synced: 7 days ago - Pushed: about 1 month ago

InseeFrLab/gonyxia-api

Size: 98.6 KB - Last synced: 6 days ago - Pushed: 8 days ago

COSAE-FR/ripacb
RIP ACB Server and client

Size: 91.8 KB - Last synced: 14 days ago - Pushed: 7 months ago

COSAE-FR/ripradius
Radius authentication cache

Size: 111 KB - Last synced: 14 days ago - Pushed: 7 months ago

COSAE-FR/riputils
Common utilities for RIP projects

Size: 105 KB - Last synced: 14 days ago - Pushed: over 1 year ago