Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /trisongz_lazyops /src /lazyops /libs /compress /zb.py
| """ | |
| ZLib Compress | |
| """ | |
| import zlib | |
| from .base import BaseCompress | |
| from typing import Union | |
| class ZLibCompress(BaseCompress): | |
| def compress(cls, data: Union[str, bytes], encoding: str = 'utf-8', **kwargs) -> bytes: | |
| """ | |
| ZLib Compress | |
| """ | |
| if isinstance(data, str): data = data.encode(encoding) | |
| return zlib.compress(data) | |
| def decompress(cls, data: Union[str, bytes], encoding: str = 'utf-8', **kwargs) -> bytes: | |
| """ | |
| ZLib Decompress | |
| """ | |
| if isinstance(data, str): data = data.encode(encoding = encoding) | |
| return zlib.decompress(data) | |
Xet Storage Details
- Size:
- 652 Bytes
- Xet hash:
- b45b827c30fdc871fb25e09f998c9ffee6b46bd0413f1f7f8798f611f1eab0b0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.