{ "info": { "author": "blester125", "author_email": "blester125@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering" ], "description": "# Delta Of Delta Encoding\n\n[\"Build](https://travis-ci.com/blester125/delta-of-delta)\n\nThis has simple implementation of various ways to encoding timestamps used in time series databases.\n\nRun `delta-of-delta-demo` to see examples of the output.\n\n## Timestamp Encoding\n\nThis is the simplest encoding scheme, in this one we just store the timestamps. This is inefficient\nbecause the raw bytes of successive timestamps only change a little over time.\n\nThis can be used with the `timestamp_encode` function or used when streaming data with the `Encoder` class.\n\nExample:\n\n * Input\n * `[1496163646, 1496163676, 1496163706, 1496163735, 1496163765]`\n * Output\n * `[1496163646, 1496163676, 1496163706, 1496163735, 1496163765]`\n\n\n## Delta Encoding\n\nThis scheme stores the initial timestamp and the differences between them. This helps because we use less\nmemory to store the delta instead of the whole timestamp\n\nThis can be used with the `delta_encode` function or used when streaming with the `DeltaEncoder` class.\n\nExample:\n\n * Input\n * `[1496163646, 1496163676, 1496163706, 1496163735, 1496163765]`\n * Output\n * `[1496163646, +30, +30, +29, +30]`\n\n\n## Delta of Delta Encoding\n\nThis scheme is based on Facebook's Gorilla time-series database and is also found in Prometheus. In this case\nwe know use the fact that we know that most entries come in at a constant rate (because we are collecting\nmetrics) we only store the delta of the time between this timestamp and the previous timestamp and the\ntime between the previous timestamp and the one before that. Most of the data coming in will be zeros\nand therefore we will get a high compression rate.\n\nThis can be used with the `delta_of_delta_encode` function or when streaming with the `DeltaOfDeltaEncoder`.\n\nExample:\n\n * Input\n * `[1496163646, 1496163676, 1496163706, 1496163735, 1496163765]`\n * Output\n * `[1496163646, +30, 0, -1, +1]`\n\n\n### The Encoder and Decoder classes\n\nThe Encoder and Decoder classes are stateful encoders and decoder that can be used to handle streaming\ntimestamps. The Encoder will record your initial timestamp in `.initial_timestamp` for easy decoding. You\ninitialize these classes with a timestamp and then as you pass in a new timestamp it will return the\nencoded/decoded representation.\n\n### The Encoding dataclass\n\nThe Encoding data class is a data structure that represents the timestamp stream encoded in some format.\nThey all have `.initial_timestamp` property that holds the first timestamp in the series and then a\nsecond property that is a list of the following values. (called `.timestamps`, `.deltas`, and\n`delta_of_deltas` respectively).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/blester125/delta-of-delta/archive/2.0.2.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/blester125/delta-of-delta", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "delta-of-delta", "package_url": "https://pypi.org/project/delta-of-delta/", "platform": "", "project_url": "https://pypi.org/project/delta-of-delta/", "project_urls": { "Download": "https://github.com/blester125/delta-of-delta/archive/2.0.2.tar.gz", "Homepage": "https://github.com/blester125/delta-of-delta" }, "release_url": "https://pypi.org/project/delta-of-delta/2.0.2/", "requires_dist": null, "requires_python": ">=3.7", "summary": "Delta-of-delta", "version": "2.0.2" }, "last_serial": 5768844, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "1750c76b283ce8a65c813b1cd0509573", "sha256": "6ab087a0efff2797955745c0bae2ab59681d7ad48cdf288b99e5a9d42efd57d6" }, "downloads": -1, "filename": "delta-of-delta-0.0.0.tar.gz", "has_sig": false, "md5_digest": "1750c76b283ce8a65c813b1cd0509573", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1853, "upload_time": "2019-09-02T00:26:37", "url": "https://files.pythonhosted.org/packages/51/30/906d109e488784c5865bd8381fa97030673ee1931345e3b3666e9c1530c2/delta-of-delta-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "e140976b4c6370b1e19c661dbf5ae80a", "sha256": "e4057a8d8a72666516704990615ea6df98af53f45659a65d1101a9f764cdc9f2" }, "downloads": -1, "filename": "delta-of-delta-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e140976b4c6370b1e19c661dbf5ae80a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1850, "upload_time": "2019-09-02T00:49:03", "url": "https://files.pythonhosted.org/packages/1c/38/92b520a91a1007f07e2eed46bc3b3e8974d989e8baed2c1a5e47da5f0650/delta-of-delta-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "308dc26a464e5baf8cd787539905b1e0", "sha256": "4a3871984815ee648cffdc9203117ce1d02fac62c3901c5c7c7af6acca78fe8b" }, "downloads": -1, "filename": "delta-of-delta-1.0.0.tar.gz", "has_sig": false, "md5_digest": "308dc26a464e5baf8cd787539905b1e0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2854, "upload_time": "2019-09-02T03:15:58", "url": "https://files.pythonhosted.org/packages/2a/16/c2d5376724b07cb04152a49311f9212032b57db8949fe71cbe5160d3ecea/delta-of-delta-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "3077725f53422ae23e2279f56a2cb922", "sha256": "ef0c9745d9a0ba2bc53e672c9bc2f768fc918b929ddaee2d16000e7617ae6a04" }, "downloads": -1, "filename": "delta-of-delta-2.0.0.tar.gz", "has_sig": false, "md5_digest": "3077725f53422ae23e2279f56a2cb922", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4753, "upload_time": "2019-09-02T04:24:44", "url": "https://files.pythonhosted.org/packages/e3/41/135a674be95b1d0272be5e5f3009effae41b9acda523a159c1887de14467/delta-of-delta-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "6d217b50a8e9a5d4aaf81cf82064e9c4", "sha256": "c96ea89a7f08a4eb765fbf38d34eaf0b10a05abe67e52edf8598f4186e89289a" }, "downloads": -1, "filename": "delta-of-delta-2.0.1.tar.gz", "has_sig": false, "md5_digest": "6d217b50a8e9a5d4aaf81cf82064e9c4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 4748, "upload_time": "2019-09-02T04:26:28", "url": "https://files.pythonhosted.org/packages/98/a2/0fd230e33baac524340b49a4e868df271922e2ee18ac7b87c7a216319ddb/delta-of-delta-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "e41066aefabdb22930e61824535aefc9", "sha256": "04fc35e9e43de7f86514de4b3df29b69a72bd3790fa3fd40460f0dff01543cc4" }, "downloads": -1, "filename": "delta-of-delta-2.0.2.tar.gz", "has_sig": false, "md5_digest": "e41066aefabdb22930e61824535aefc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 4754, "upload_time": "2019-09-02T04:28:16", "url": "https://files.pythonhosted.org/packages/57/83/2716315cecf48fc1f47bdbbdf6e430729ed96597f1ccba05b9878b973d28/delta-of-delta-2.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e41066aefabdb22930e61824535aefc9", "sha256": "04fc35e9e43de7f86514de4b3df29b69a72bd3790fa3fd40460f0dff01543cc4" }, "downloads": -1, "filename": "delta-of-delta-2.0.2.tar.gz", "has_sig": false, "md5_digest": "e41066aefabdb22930e61824535aefc9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 4754, "upload_time": "2019-09-02T04:28:16", "url": "https://files.pythonhosted.org/packages/57/83/2716315cecf48fc1f47bdbbdf6e430729ed96597f1ccba05b9878b973d28/delta-of-delta-2.0.2.tar.gz" } ] }