1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

serialize/deserialize colors to/from bytes instead of strings

it's a tiny bit faster and saves a bit of memory
This commit is contained in:
Dobatymo
2022-09-27 17:34:57 +08:00
parent 1f1dfa88dc
commit f1153c85c0
9 changed files with 47 additions and 78 deletions

View File

@@ -2,5 +2,5 @@ from typing import Union, Tuple, List
_block = Tuple[int, int, int]
def colors_to_string(colors: List[_block]) -> str: ... # noqa: E302
def string_to_colors(s: str) -> Union[List[_block], None]: ...
def colors_to_bytes(colors: List[_block]) -> bytes: ... # noqa: E302
def bytes_to_colors(s: bytes) -> Union[List[_block], None]: ...