diff --git a/fixtures/sample.epub b/fixtures/sample.epub new file mode 100644 index 0000000..b1aee6c Binary files /dev/null and b/fixtures/sample.epub differ diff --git a/fixtures/sample.jpg b/fixtures/sample.jpg index e9e82bf..bbd2cb5 100644 Binary files a/fixtures/sample.jpg and b/fixtures/sample.jpg differ diff --git a/fixtures/sample.pdf b/fixtures/sample.pdf new file mode 100644 index 0000000..04f6c79 Binary files /dev/null and b/fixtures/sample.pdf differ diff --git a/fixtures/sample.xlsx b/fixtures/sample.xlsx index b27faf1..2487865 100644 Binary files a/fixtures/sample.xlsx and b/fixtures/sample.xlsx differ diff --git a/fixtures/sources.txt b/fixtures/sources.txt index 8385148..f9b5946 100644 --- a/fixtures/sources.txt +++ b/fixtures/sources.txt @@ -32,3 +32,42 @@ sample.webm * License: CC BY (https://creativecommons.org/licenses/by/3.0) +sample.pdf +========== +* Original filename: + f4506t.pdf +* Source: + https://www.irs.gov/pub/irs-pdf/f4506t.pdf +* Attribution: + IRS form 4506-T (June 2019), US Department of the Treasury + +sample.epub +=========== +* Original filename: + p1544.epub +* Source: + https://www.irs.gov/pub/ebook/p1544.epub +* Attribution: + IRS publication "Reporting Cash Payments of Over $10,000" (Sep 2014), + US Department of the Treasury + +sample.xlsx +=========== +* Original filename: + TTR-tables-2019.xlsx +* Source: + https://home.treasury.gov/system/files/226/TTR-tables-2019.xlsx +* Attribution: + "2019 Total Taxable Resource Estimates", US Department of the Treasury + +sample.jpg +========== +* Original filename: + 697_VPME2279_1.jpg +* Source + https://www.bep.gov/images/697_VPME2279_1.jpg +* Attribution: + "Die proof - Ornamental Alphabet, A to H inclusive" + Bureau of Engraving & Printing image gallery, US Department of the Treasury + + diff --git a/match_test.go b/match_test.go index fb99563..ecb35e3 100644 --- a/match_test.go +++ b/match_test.go @@ -51,6 +51,8 @@ func TestMatchFile(t *testing.T) { {"mov"}, {"wasm"}, {"dwg"}, + {"pdf"}, + {"epub"}, } for _, test := range cases { @@ -169,6 +171,8 @@ var docxBuffer, _ = ioutil.ReadFile("./fixtures/sample.docx") var dwgBuffer, _ = ioutil.ReadFile("./fixtures/sample.dwg") var mkvBuffer, _ = ioutil.ReadFile("./fixtures/sample.mkv") var webmBuffer, _ = ioutil.ReadFile("./fixtures/sample.webm") +var pdfBuffer, _ = ioutil.ReadFile("./fixtures/sample.pdf") +var epubBuffer, _ = ioutil.ReadFile("./fixtures/sample.epub") func BenchmarkMatchTar(b *testing.B) { for n := 0; n < b.N; n++ { @@ -235,3 +239,15 @@ func BenchmarkMatchWebm(b *testing.B) { Match(webmBuffer) } } + +func BenchmarkMatchPdf(b *testing.B) { + for n := 0; n < b.N; n++ { + Match(pdfBuffer) + } +} + +func BenchmarkMatchEpub(b *testing.B) { + for n := 0; n < b.N; n++ { + Match(epubBuffer) + } +}