Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/h2non/filetype
/ functions
Functions
144 in github.com/h2non/filetype
⨍
Functions
144
◇
Types & classes
6
↓ 15 callers
Function
Match
Match infers the file type of a given buffer inspecting its magic numbers signature
match.go:21
↓ 6 callers
Function
doMatchMap
(buf []byte, machers matchers.Map)
kind.go:74
↓ 4 callers
Function
Get
Get retrieves a Type by extension
types/types.go:15
↓ 3 callers
Function
Is
Is checks if a given buffer matches with the given file type extension
filetype.go:31
↓ 3 callers
Function
IsMIMESupported
IsMIMESupported checks if a given MIME type is supported
filetype.go:85
↓ 3 callers
Function
IsSupported
IsSupported checks if a given file extension is supported
filetype.go:70
↓ 3 callers
Function
MatchMap
MatchMap performs a file matching against a map of match functions
match.go:78
↓ 3 callers
Function
NewType
NewType creates a new Type
types/type.go:10
↓ 3 callers
Function
msooxml
(buf []byte)
matchers/document.go:90
↓ 2 callers
Function
AddType
AddType registers a new file type
filetype.go:26
↓ 2 callers
Function
Image
Image tries to match a file as image type
kind.go:9
↓ 2 callers
Function
IsType
IsType checks if a given buffer matches with the given file type
filetype.go:45
↓ 2 callers
Function
MatchReader
MatchReader is convenient wrapper to Match() any Reader
match.go:55
↓ 2 callers
Function
NewMatcher
Create and register a new type matcher function
matchers/matchers.go:24
↓ 2 callers
Function
compareBytes
(slice, subSlice []byte, startOffset int)
matchers/document.go:149
↓ 2 callers
Function
containsMatroskaSignature
(buf, subType []byte)
matchers/video.go:133
↓ 2 callers
Function
splitMime
(s string)
types/split.go:5
↓ 1 callers
Function
Add
Add registers a new type in the package
types/types.go:9
↓ 1 callers
Function
AddMatcher
AddMatcher registers a new matcher type
match.go:67
↓ 1 callers
Function
Archive
Archive tries to match a file as generic archive type
kind.go:53
↓ 1 callers
Function
Audio
Audio tries to match a file as audio type
kind.go:20
↓ 1 callers
Function
CR2
(buf []byte)
matchers/image.go:78
↓ 1 callers
Function
Dex
Dex detects dalvik executable(DEX)
matchers/application.go:27
↓ 1 callers
Function
Document
Document tries to match a file as document type
kind.go:64
↓ 1 callers
Function
Font
Font tries to match a file as text font type
kind.go:42
↓ 1 callers
Function
GetFtyp
GetFtyp returns the major brand, minor version and compatible brands of the ISO-BMFF data
matchers/isobmff/isobmff.go:19
↓ 1 callers
Function
GetType
GetType retrieves a Type by file extension
filetype.go:100
↓ 1 callers
Function
IsISOBMFF
IsISOBMFF checks whether the given buffer represents ISO Base Media File Format data
matchers/isobmff/isobmff.go:6
↓ 1 callers
Function
IsImage
IsImage checks if the given buffer is an image type
kind.go:14
↓ 1 callers
Function
IsMIME
IsMIME checks if a given buffer matches with the given MIME type
filetype.go:54
↓ 1 callers
Function
MatchFile
MatchFile infers a file type for a file
match.go:44
↓ 1 callers
Function
Matches
Matches checks if the given buffer matches with some supported file type
match.go:72
↓ 1 callers
Function
MatchesMap
MatchesMap is an alias to Matches() but using matching against a map of match functions
match.go:88
↓ 1 callers
Function
NewMIME
Creates a new MIME type
types/mime.go:11
↓ 1 callers
Function
Video
Video tries to match a file as video type
kind.go:31
↓ 1 callers
Function
checkMSOoml
(buf []byte, offset int)
matchers/document.go:166
↓ 1 callers
Function
register
(matchers ...Map)
matchers/matchers.go:38
↓ 1 callers
Function
search
(buf []byte, start, rangeNum int)
matchers/document.go:183
Function
Aac
(buf []byte)
matchers/audio.go:71
Function
Amr
(buf []byte)
matchers/audio.go:64
Function
Ar
(buf []byte)
matchers/archive.go:193
Function
Avi
(buf []byte)
matchers/video.go:63
Function
BenchmarkMatchDocx
(b *testing.B)
match_test.go:215
Function
BenchmarkMatchDwg
(b *testing.B)
match_test.go:221
Function
BenchmarkMatchGif
(b *testing.B)
match_test.go:191
Function
BenchmarkMatchJpeg
(b *testing.B)
match_test.go:185
Function
BenchmarkMatchMkv
(b *testing.B)
match_test.go:227
Function
BenchmarkMatchPng
(b *testing.B)
match_test.go:197
Function
BenchmarkMatchPptx
(b *testing.B)
match_test.go:209
Function
BenchmarkMatchTar
(b *testing.B)
match_test.go:173
Function
BenchmarkMatchWebm
(b *testing.B)
match_test.go:233
Function
BenchmarkMatchXlsx
(b *testing.B)
match_test.go:203
Function
BenchmarkMatchZip
(b *testing.B)
match_test.go:179
Function
Bmp
(buf []byte)
matchers/image.go:93
Function
Bz2
(buf []byte)
matchers/archive.go:101
Function
Cab
(buf []byte)
matchers/archive.go:148
Function
Crx
(buf []byte)
matchers/archive.go:142
Function
Dcm
(buf []byte)
matchers/archive.go:225
Function
Deb
(buf []byte)
matchers/archive.go:182
Function
Dey
Dey Optimized Dalvik Executable(ODEX)
matchers/application.go:37
Function
Doc
reference: https://bz.apache.org/ooo/show_bug.cgi?id=111457
matchers/document.go:39
Function
Docx
(buf []byte)
matchers/document.go:51
Function
Dwg
(buf []byte)
matchers/image.go:139
Function
Elf
(buf []byte)
matchers/archive.go:219
Function
Eot
(buf []byte)
matchers/archive.go:154
Function
Epub
(buf []byte)
matchers/archive.go:63
Function
Exe
(buf []byte)
matchers/archive.go:118
Function
Flac
(buf []byte)
matchers/audio.go:50
Function
Flv
(buf []byte)
matchers/video.go:87
Function
Get
Get is an alias to Match()
match.go:39
Function
Gif
(buf []byte)
matchers/image.go:67
Function
Gz
(buf []byte)
matchers/archive.go:96
Function
Heif
(buf []byte)
matchers/image.go:118
Function
Ico
(buf []byte)
matchers/image.go:112
Function
IsArchive
IsArchive checks if the given buffer is an archive type
kind.go:58
Function
IsAudio
IsAudio checks if the given buffer is an audio type
kind.go:25
Function
IsDocument
IsDocument checks if the given buffer is an document type
kind.go:69
Function
IsExtension
IsExtension semantic alias to Is()
filetype.go:40
Function
IsFont
IsFont checks if the given buffer is a font type
kind.go:47
Function
IsVideo
IsVideo checks if the given buffer is a video type
kind.go:36
Function
Iso
(buf []byte)
matchers/archive.go:231
Function
Jpeg
(buf []byte)
matchers/image.go:37
Function
Jpeg2000
(buf []byte)
matchers/image.go:44
Function
Jxr
(buf []byte)
matchers/image.go:99
Function
Lz
(buf []byte)
matchers/archive.go:207
Function
M4a
(buf []byte)
matchers/audio.go:37
Function
M4v
(buf []byte)
matchers/video.go:31
Function
MachO
(buf []byte)
matchers/archive.go:238
Function
Match3gp
(buf []byte)
matchers/video.go:126
Function
Midi
(buf []byte)
matchers/audio.go:25
Function
Mkv
(buf []byte)
matchers/video.go:39
Function
Mov
(buf []byte)
matchers/video.go:53
Function
Mp3
(buf []byte)
matchers/audio.go:31
Function
Mp4
(buf []byte)
matchers/video.go:93
Function
Mpeg
(buf []byte)
matchers/video.go:80
Function
Nes
(buf []byte)
matchers/archive.go:136
Function
Ogg
(buf []byte)
matchers/audio.go:44
Function
Otf
(buf []byte)
matchers/font.go:40
Function
Pdf
(buf []byte)
matchers/archive.go:112
Function
Png
(buf []byte)
matchers/image.go:61
next →
1–100 of 144, ranked by callers