{"id":37022944,"url":"https://github.com/milpol/gorilla4j","last_synced_at":"2026-01-14T02:44:58.277Z","repository":{"id":55149782,"uuid":"191034898","full_name":"milpol/gorilla4j","owner":"milpol","description":"Implementation of time series compression method based on the Facebook Gorilla paper ","archived":false,"fork":false,"pushed_at":"2021-01-06T22:43:14.000Z","size":49,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-04T13:38:26.350Z","etag":null,"topics":["gorilla","java","timeseries","timeseries-data"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milpol.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2019-06-09T17:20:41.000Z","updated_at":"2025-01-26T11:25:34.000Z","dependencies_parsed_at":"2022-08-14T13:31:22.167Z","dependency_job_id":null,"html_url":"https://github.com/milpol/gorilla4j","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/milpol/gorilla4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milpol%2Fgorilla4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milpol%2Fgorilla4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milpol%2Fgorilla4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milpol%2Fgorilla4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milpol","download_url":"https://codeload.github.com/milpol/gorilla4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milpol%2Fgorilla4j/sbom","scorecard":{"id":647465,"data":{"date":"2025-08-11","repo":{"name":"github.com/milpol/gorilla4j","commit":"2a5c21e6d9b0bd29f948b68a170bd9019af58bee"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T12:31:11.630Z","repository_id":55149782,"created_at":"2025-08-21T12:31:11.630Z","updated_at":"2025-08-21T12:31:11.630Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["gorilla","java","timeseries","timeseries-data"],"created_at":"2026-01-14T02:44:57.629Z","updated_at":"2026-01-14T02:44:58.256Z","avatar_url":"https://github.com/milpol.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Travis CI](https://api.travis-ci.org/milpol/gorilla4j.svg) ![Maven Central](https://img.shields.io/maven-central/v/com.jarslab.ts/gorilla4j.svg)\n# What is all about\nIt is all about storing data in a efficient way. \n\nStop! *two* things. First: it is not about any data, but a very special kind: time series. \nSounds scary but all in all it is just a value (numerical) in time (epoch). \nSecond: *but they said that storage is cheap!* Well, so the bubble gum, it is just a buck. Million packs do the million bucks though.\nAlso, what *they* don't say that we store enormous load of data which we write once and read ~~once~~ never.\n## Give me the numbers\nAs mentioned, we are considering here a time series data (value in time). Let's say we want to store stock price valuation of single company, single day, sampled every 10 second.\n8 hours gives 2880 samples, sample is a time (Java long, 8 bytes) and a value (Java double, 8 bytes). Math is simple:\n\n`8 * 60 * 6 * 16 = 46080B = 45KB` \nPhew. That's nothing you'll say. Sure, the bubble gum is just a buck, blah, blah...\nHow about Gorilla format, can it do any better?\n\nFrom ad-hoc test:\n\n`~8465B ~= 8,3KB`\n(We could compare that to JSON format... but it would not make any sense.)\nJust to be clear: we are talking about exact same data, no rounding or data losses, but...\nWell, in wise algorithms there is almost always *but*, the one here is how the data is distributed.\n# But how?\nAll answers and technical guts can be found in great paper from the Facebook engineers [Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf)\n# Usage\n## Maven coords\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.jarslab.ts\u003c/groupId\u003e\n  \u003cartifactId\u003egorilla4j\u003c/artifactId\u003e\n  \u003cversion\u003e0.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n## Examples\n### Building basic Gorilla block\n```java\nTSG tsg = new TSG(1546300800, new OutBitSet());\ntsg.put(1546300800, 4.0);\ntsg.put(1546300860, 4.1);\ntsg.put(1546300920, 4.2);\ntsg.close(); // at this point no more points are accepted\n```\n### Dump block and re-create\n```java\nTSG tsg = new TSG(1546300800, new OutBitSet());\ntsg.put(1546300800, 4.2);\nbyte[] tsgBytes = tsg.toBytes();\nTSG recreatedTsg = TSG.fromBytes(tsgBytes); // block is still open and can accept points\n```\n### Extract iterator from block\n```java\nTSG tsg = new TSG(1546300800, new OutBitSet());\ntsg.put(1546300800, 4.2);\nIterator\u003cDataPoint\u003e tsgIterator = tsg.toIterator(); // iterator works on copied bytes, tsg accepts points\n```\n### Open block in iterator\n```java\nTSG tsg = new TSG(1546300800, new OutBitSet());\ntsg.put(1546300800, 4.2);\ntsg.close();\nbyte[] tsgBytes = tsg.getDataBytes();\nIterator\u003cDataPoint\u003e tsgIterator = new TSGIterator(new InBitSet(tsgBytes));\n```\n# Other Java implementation?\nPlease check excellent [Michael Burman](https://github.com/burmanm) implementation: [gorilla-tsc](https://github.com/burmanm/gorilla-tsc). \n\n# Changelog\n## 0.4\n* Bump test libs\n## 0.2\n* Use `long` for time values (start and current).\n* Move `DataPoint` to abstraction\n* Add JavaDocs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilpol%2Fgorilla4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilpol%2Fgorilla4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilpol%2Fgorilla4j/lists"}