{"id":48939983,"url":"https://github.com/scanoss/hpsm","last_synced_at":"2026-04-17T13:12:03.191Z","repository":{"id":78626679,"uuid":"498479978","full_name":"scanoss/hpsm","owner":"scanoss","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-02T14:31:57.000Z","size":2359,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-03T03:28:00.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scanoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/GPL-2.0-only.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-31T20:00:06.000Z","updated_at":"2026-02-02T14:32:42.000Z","dependencies_parsed_at":"2024-03-02T01:27:03.239Z","dependency_job_id":"67d9918c-a0fa-4127-bf35-81d8f28c9018","html_url":"https://github.com/scanoss/hpsm","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/scanoss/hpsm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fhpsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fhpsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fhpsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fhpsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scanoss","download_url":"https://codeload.github.com/scanoss/hpsm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scanoss%2Fhpsm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31930257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-17T13:11:56.872Z","updated_at":"2026-04-17T13:12:03.165Z","avatar_url":"https://github.com/scanoss.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HPSM \n\nThis project defines the functionality to do High Precision Snippet Matching on any file.\nThe main principle is based on semi brute force search.\n\n* Each line of the file is normalized and then hashed using CRC8.\n* The file with the given MD5 is also hashed.\n* The longest sequence of CRCs is calculated doing greedy advance on local and remote file.\n\nThe functionality is available by:\n\n* **API**: an endpoint receives a json structure defining a set of \u003cmd5\u003e\u003c[hashes]\u003e to be processed. The API could be deployed on the sources server or can download the sources from several servers.\n* **libhpsm**: A shared library that provides local processing (by downloading from ossk.org) or remote processing (calling the above mentioned API). It also provides functionallity to hash the content of a file. (\"hpsm=01234586787887....\")\n* **CLI**: A simple shell console can be used to:\n  * Get the *hpsm=* string to be appended to wfp file\n  * Get the *.wfp* file containing the hpsm= string\n  * Compare two files in a graphical view. The first file must be local but the second file can be local or a remote MD5\n* **go module** A go package (Coming soon).\n\n## Remote Files\nBy default, files from *localhost/api/file_contents* are retrieved. If other sources server is used, the environment variable **SCANOSS_FILE_CONTENTS_URL** must be used. Eg:\n  \n ``export  SCANOSS_FILE_CONTENTS_URL=https://api.scanoss.com/file_contents/``\n\nYou can also set the environmental variable `SCANOSS_API_KEY` that will be passed as the `X-Session` header.\n\n ``export  SCANOSS_API_KEY=[YOUR_KEY]``\n\n\n## Building\nA makefile is provided to automate the building process\n\n``make build_lib`` \n\nCreates *libhpsm.so* and *libhpsm.h*. *libhpsm.so* must be placed on **/usr/lib** to make the feature available. *libhpsm.h* should be used by the client application, eg: **inc/** folder\n\n\n``make build_cli`` \n\nCreates *hpsm* cli application\n\n  \n``make build_amd`` \n\nBuilds and packages *hpsm* lib and cli application. Creates temporary directory **scripts** with **hpsm** (binary), **libhpsm.so** (lib), and **libhpsm.h** (header file).\n\n``make install`` \n\nCopy both files *libhpsm.so* and *hpsm* to their destination to make the feature work (**/usr/lib** and **/usr/bin/**)\n\n  ``make clean`` \n\nRemoves compiled binaries *libhpsm.so* and *hpsm*\n\n\n\n\n\n\u0026copy; SCANOSS 2018-2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fhpsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscanoss%2Fhpsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscanoss%2Fhpsm/lists"}