Infer.Book (Infer v0.1.1) View Source
Book 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 epub.
Takes the binary file contents as arguments. Returns true
if it's a mobi.
Link to this section Functions
Specs
Takes the binary file contents as arguments. Returns true
if it's a epub.
Examples
iex> binary = File.read!("test/books/sample.epub")
iex> Infer.Book.is_epub(binary)
true
iex> binary = File.read!("test/books/sample.mobi")
iex> Infer.Book.is_epub(binary)
false
Specs
Takes the binary file contents as arguments. Returns true
if it's a mobi.
Examples
iex> binary = File.read!("test/books/sample.mobi")
iex> Infer.Book.is_mobi(binary)
true
iex> binary = File.read!("test/books/sample.epub")
iex> Infer.Book.is_mobi(binary)
false