Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /trisongz_lazyops /src /lazyops /libs /compress /base.py
| import abc | |
| from typing import Union | |
| from lazyops.utils.pooler import ThreadPoolV2 as ThreadPooler | |
| class BaseCompress(abc.ABC): | |
| def compress(cls, data: Union[str, bytes], **kwargs) -> bytes: | |
| """ | |
| Base Compress | |
| """ | |
| pass | |
| def decompress(cls, data: Union[str, bytes], **kwargs) -> bytes: | |
| """ | |
| Base Decompress | |
| """ | |
| pass | |
| async def acompress(cls, data: Union[str, bytes], **kwargs) -> bytes: | |
| """ | |
| Base Compress | |
| """ | |
| return await ThreadPooler.run_async(cls.compress, data, **kwargs) | |
| async def adecompress(cls, data: Union[str, bytes], **kwargs) -> bytes: | |
| """ | |
| Base Decompress | |
| """ | |
| return await ThreadPooler.run_async(cls.decompress, data, **kwargs) | |
Xet Storage Details
- Size:
- 909 Bytes
- Xet hash:
- 1519c1ef421cb71e1d9e2c78ff61af5a46a3171fabd36fef8f67752387969d6e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.