Name | buffer-matcher JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | More efficiently match bytes using memoryviews to prevent copying |
upload_time | 2024-04-11 20:15:06 |
maintainer | None |
docs_url | None |
author | Shae.c32 |
requires_python | >=3.12 |
license | None |
keywords |
buffer
match
memory
view
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Buffer matchers, as I refer to them, are wrappers around bytes that
allow easier, more memory-efficient reading and pattern matching
These are used in my programming language [Caustic](https://codeberg.org/Caustic)'s [Lexer](https://codeberg.org/Caustic/CausticLexer)
Beyond base classes, this package provides two buffer matcher classes:
- `DynamicBufferMatcher` / `dynamic.BufferMatcher`
- `StaticBufferMatcher` / `static.BufferMatcher`
The buffer classes shown above can be `.read()`, `.seek()`ed through,
and `.match()`ed against strings, callables, or regular expressions
The "dynamic" and "static" in the names refer to how they calculate
line and column numbers -- namely, the "dynamic" buffer matcher
calculates line and column numbers via properties, every time
they are accessed; whilst the "static" buffer matcher calculates
line and column numbers only when the position of the matcher is
changed. "Dynamic" buffer matchers are recommended if line and column
numbers are accessed less often than the position is changed, and vice-versa
for "static" buffers.
# Changelog
## v0.1.1
- Fixed `SimpleBufferMatcher.copy_peek()` ignoring `size` parameter
Raw data
{
"_id": null,
"home_page": null,
"name": "buffer-matcher",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "buffer, match, memory, view",
"author": "Shae.c32",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/86/6a/f6b335491229d4dac10268f0edc2e3cc8af32288160bb897d88738bedca6/buffer-matcher-0.1.1.tar.gz",
"platform": null,
"description": "Buffer matchers, as I refer to them, are wrappers around bytes that\nallow easier, more memory-efficient reading and pattern matching\n\nThese are used in my programming language [Caustic](https://codeberg.org/Caustic)'s [Lexer](https://codeberg.org/Caustic/CausticLexer)\n\nBeyond base classes, this package provides two buffer matcher classes:\n- `DynamicBufferMatcher` / `dynamic.BufferMatcher`\n- `StaticBufferMatcher` / `static.BufferMatcher`\n\nThe buffer classes shown above can be `.read()`, `.seek()`ed through,\nand `.match()`ed against strings, callables, or regular expressions\n\nThe \"dynamic\" and \"static\" in the names refer to how they calculate\nline and column numbers -- namely, the \"dynamic\" buffer matcher\ncalculates line and column numbers via properties, every time\nthey are accessed; whilst the \"static\" buffer matcher calculates\nline and column numbers only when the position of the matcher is\nchanged. \"Dynamic\" buffer matchers are recommended if line and column\nnumbers are accessed less often than the position is changed, and vice-versa\nfor \"static\" buffers. \n\n# Changelog\n\n## v0.1.1\n- Fixed `SimpleBufferMatcher.copy_peek()` ignoring `size` parameter\n",
"bugtrack_url": null,
"license": null,
"summary": "More efficiently match bytes using memoryviews to prevent copying",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://codeberg.org/Shae/BufferMatcher",
"Issues": "https://codeberg.org/Shae/BufferMatcher/issues"
},
"split_keywords": [
"buffer",
" match",
" memory",
" view"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7c79f97b1d1ee60433e28290b8140798574b6b6bed242875680d897c39641130",
"md5": "c59ee2b8116ef4739ca6fcc318af289b",
"sha256": "3881552c29c9653e21a76b8488a346cfc7280dddcd51b2a3a846c4bb63f75340"
},
"downloads": -1,
"filename": "buffer_matcher-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c59ee2b8116ef4739ca6fcc318af289b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 7927,
"upload_time": "2024-04-11T20:14:43",
"upload_time_iso_8601": "2024-04-11T20:14:43.054617Z",
"url": "https://files.pythonhosted.org/packages/7c/79/f97b1d1ee60433e28290b8140798574b6b6bed242875680d897c39641130/buffer_matcher-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "866af6b335491229d4dac10268f0edc2e3cc8af32288160bb897d88738bedca6",
"md5": "9da9c4829b34d065a1c1f975d588cb84",
"sha256": "a1b499a7cd1bdec3572daa66562fbe3c7a13eded022155c74b22ad30deee48d7"
},
"downloads": -1,
"filename": "buffer-matcher-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "9da9c4829b34d065a1c1f975d588cb84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 6870,
"upload_time": "2024-04-11T20:15:06",
"upload_time_iso_8601": "2024-04-11T20:15:06.618991Z",
"url": "https://files.pythonhosted.org/packages/86/6a/f6b335491229d4dac10268f0edc2e3cc8af32288160bb897d88738bedca6/buffer-matcher-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-11 20:15:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": true,
"codeberg_user": "Shae",
"codeberg_project": "BufferMatcher",
"lcname": "buffer-matcher"
}