{"id":13707836,"url":"https://github.com/hrbrmstr/ssdeepr","last_synced_at":"2026-06-07T15:31:38.514Z","repository":{"id":141238858,"uuid":"244393300","full_name":"hrbrmstr/ssdeepr","owner":"hrbrmstr","description":"Context Triggered Piecewise Hash Computation Using 'ssdeep' for R","archived":false,"fork":false,"pushed_at":"2020-03-12T11:18:44.000Z","size":1525,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T14:18:20.154Z","etag":null,"topics":["r","rstats","ssdeep"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-02T14:36:39.000Z","updated_at":"2020-03-12T11:18:47.000Z","dependencies_parsed_at":"2024-01-17T08:44:42.899Z","dependency_job_id":"b3edcd6b-3aaf-4f2d-aae2-cc88bceb58e8","html_url":"https://github.com/hrbrmstr/ssdeepr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hrbrmstr/ssdeepr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fssdeepr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fssdeepr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fssdeepr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fssdeepr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/ssdeepr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fssdeepr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34027670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","rstats","ssdeep"],"created_at":"2024-08-02T22:01:45.352Z","updated_at":"2026-06-07T15:31:38.497Z","avatar_url":"https://github.com/hrbrmstr.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"---\noutput: rmarkdown::github_document\neditor_options: \n  chunk_output_type: console\n---\n```{r pkg-knitr-opts, include=FALSE}\nhrbrpkghelpr::global_opts()\n```\n\n```{r badges, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::stinking_badges()\n```\n\n```{r description, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::yank_title_and_description()\n```\n\n## What's Inside The Tin\n\nThe following functions are implemented:\n\n```{r ingredients, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::describe_ingredients()\n```\n\n## Installation\n\nYou'll need `libfuzzy` installed and available for linking. See \u003chttps://ssdeep-project.github.io/ssdeep/index.html#platforms\u003e for platform support.\n\nOn Ubuntu/Debian you can do:\n\n```shell\nsudo apt install libfuzzy-dev\n```\n\nOn macOS you can do:\n\n```shell\nbrew install ssdeep\n```\n\nThe library works on Windows, I just need to do some manual labor for that.\n\nPackage installation:\n\n```{r install-ex, results='asis', echo=FALSE, cache=FALSE}\nhrbrpkghelpr::install_block()\n```\n\n## Usage\n\n```{r lib-ex}\nlibrary(ssdeepr)\n\n# current version\npackageVersion(\"ssdeepr\")\n\n```\n\n- `index.html` is a static copy of a blog main page with a bunch of `\u003cdiv\u003e`s with article snippets\n- `index1.html` is the same file as `index.htmnl` with a changed cache timestamp at the end\n- `index2.html` is the same file as `index.html` with one article snippet removed\n- `RMacOSX-FAQ.html` is the CRAN 'R for Mac OS X FAQ'\n\n```{r u-01}\nsystem.file(\"extdat\", package=\"ssdeepr\") %\u003e% \n  list.files(full.names = TRUE, pattern = \"html$\", include.dirs = FALSE) %\u003e% \n  hash_file() -\u003e hashes\n\nhashes\n\nhash_compare(hashes$hash[1], hashes$hash[1])\nhash_compare(hashes$hash[1], hashes$hash[2])\nhash_compare(hashes$hash[1], hashes$hash[3])\nhash_compare(hashes$hash[1], hashes$hash[4])\n```\n\nWorks with Connections, too. All three should be the same if the Wikipedia page hasn't changed since making local copies in the package.\n\nUsing `hash_con()` has the advantage of not requiring the entire contents of the target blob to be read into memory in exchange for a tiny cost to speed for most files (see Benchmarks).\n\nNOTE that retrieving the URL contents with different user-agent strings and/or with javascript-enabled may/will likely generate different content and, thus, a different hash.\n\n```{r u-02}\n(k1 \u003c- hash_con(url(\"https://en.wikipedia.org/wiki/Donald_Knuth\", \n                    header = setNames(splashr::ua_ios_safari, \"User-Agent\"))))\n\n(k2 \u003c- hash_con(file(system.file(\"knuth\", \"local.html\", package = \"ssdeepr\"))))\n\n(k3 \u003c- hash_con(gzfile(system.file(\"knuth\", \"local.gz\", package = \"ssdeepr\"))))\n\nhash_compare(k1, k2)\n\nhash_compare(k1, k3)\n\nhash_compare(k2, k3)\n```\n\nBenchmarks\n\n```{r u-03}\nmicrobenchmark::microbenchmark(\n  con = hash_con(file(system.file(\"knuth\", \"local.html\", package = \"ssdeepr\"))),\n  gzc = hash_con(gzfile(system.file(\"knuth\", \"local.gz\", package = \"ssdeepr\"))),\n  fil = hash_file(system.file(\"knuth\", \"local.html\", package = \"ssdeepr\"))\n)\n```\n\n## ssdeepr Metrics\n\n```{r cloc, echo=FALSE}\ncloc::cloc_pkg_md()\n```\n\n## Code of Conduct\n\nPlease note that this project is released with a Contributor Code of Conduct. \nBy participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fssdeepr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fssdeepr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fssdeepr/lists"}