Infer.Archive (Infer v0.1.0) View Source
Archive type matchers based on the magic number
Link to this section Summary
Functions
Takes the binary file contents as arguments. Returns true
if it's a 7z archive.
Takes the binary file contents as arguments. Returns true
if it's a ar archive.
Takes the binary file contents as arguments. Returns true
if it's a bzip archive.
Takes the binary file contents as arguments. Returns true
if it's a CAB.
Takes the binary file contents as arguments. Returns true
if it's a Google Chrome Extension.
Takes the binary file contents as arguments. Returns true
if it's a dcm archive.
Takes the binary file contents as arguments. Returns true
if it's a deb archive.
Takes the binary file contents as arguments. Returns true
if it's a eot octet stream.
Takes the binary file contents as arguments. Returns true
if it's a gzip archive.
Takes the binary file contents as arguments. Returns true
if it's a lzip archive.
Takes the binary file contents as arguments. Returns true
if it's a MSI windows installer archive.
Takes the binary file contents as arguments. Returns true
if it's a Nintendo NES ROM.
Takes the binary file contents as arguments. Returns true
if it's a pdf.
Takes the binary file contents as arguments. Returns true
if it's a postscript.
Takes the binary file contents as arguments. Returns true
if it's a rar archive.
Takes the binary file contents as arguments. Returns true
if it's a RPM.
Takes the binary file contents as arguments. Returns true
if it's a rtf.
Takes the binary file contents as arguments. Returns true
if it's a sqlite3 database.
Takes the binary file contents as arguments. Returns true
if it's a swf.
Takes the binary file contents as arguments. Returns true
if it's a tar archive.
Takes the binary file contents as arguments. Returns true
if it's a xz archive.
Takes the binary file contents as arguments. Returns true
if it's a z archive.
Takes the binary file contents as arguments. Returns true
if it's a zip archive.
Takes the binary file contents as arguments. Returns true
if it's a Zstd archive.
Link to this section Functions
Specs
Takes the binary file contents as arguments. Returns true
if it's a 7z archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a ar archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a bzip archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a CAB.
Specs
Takes the binary file contents as arguments. Returns true
if it's a Google Chrome Extension.
Specs
Takes the binary file contents as arguments. Returns true
if it's a dcm archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a deb archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a eot octet stream.
See Infer.Book.is_epub/1
.
Specs
Takes the binary file contents as arguments. Returns true
if it's a gzip archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a lzip archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a MSI windows installer archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a Nintendo NES ROM.
Specs
Takes the binary file contents as arguments. Returns true
if it's a pdf.
Examples
iex> binary = File.read!("test/archives/sample.pdf")
iex> Infer.Archive.is_pdf(binary)
true
Specs
Takes the binary file contents as arguments. Returns true
if it's a postscript.
Specs
Takes the binary file contents as arguments. Returns true
if it's a rar archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a RPM.
Specs
Takes the binary file contents as arguments. Returns true
if it's a rtf.
Specs
Takes the binary file contents as arguments. Returns true
if it's a sqlite3 database.
Examples
iex> binary = File.read!("test/archives/sample.db")
iex> Infer.Archive.is_sqlite(binary)
true
Specs
Takes the binary file contents as arguments. Returns true
if it's a swf.
Specs
Takes the binary file contents as arguments. Returns true
if it's a tar archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a xz archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a z archive.
Specs
Takes the binary file contents as arguments. Returns true
if it's a zip archive.
See: https://en.wikipedia.org/wiki/List_of_file_signatures
Examples
iex> binary = File.read!("test/archives/sample.zip")
iex> Infer.Archive.is_zip(binary)
true
Specs
Takes the binary file contents as arguments. Returns true
if it's a Zstd archive.
## Examples
iex> binary = File.read!("test/archives/sample.tar.zst")
iex> Infer.Archive.is_zst(binary)
true