KL-Py 0.4.4__tar.gz → 0.4.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kl_py-0.4.4 → kl_py-0.4.6}/PKG-INFO +2 -1
- {kl_py-0.4.4 → kl_py-0.4.6}/pyproject.toml +3 -2
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/KL_Py.py +35 -7
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/__init__.py +262 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/__init__.pyi +297 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/__init__.py +245 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/_blocks_output_buffer.py +131 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/_common.py +148 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/buffer.py +33 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/compressor.py +382 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/decompressor.py +368 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_cffi/zstddict.py +181 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_compat.py +78 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_shutil.py +167 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_streams.py +162 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_zstd.py +49 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/_zstdfile.py +347 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/tarfile.py +3205 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/tarfile.pyi +817 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/__init__.py +2455 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/__init__.pyi +295 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/__main__.py +4 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/_path/__init__.py +452 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/_path/__init__.pyi +84 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/_path/glob.py +113 -0
- kl_py-0.4.6/src/KL_Py/requests/backports/zstd/zipfile/_path/glob.pyi +19 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/__init__.py +570 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/compat.py +32 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/decoder.py +428 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/encoder.py +806 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/errors.py +53 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/ordered_dict.py +103 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/raw_json.py +9 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/scanner.py +87 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/__init__.py +97 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/_cibw_runner.py +7 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/_helpers.py +17 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_bigint_as_string.py +67 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_bitsize_int_as_string.py +120 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_check_circular.py +50 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_decimal.py +133 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_decode.py +206 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_default.py +9 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_dump.py +453 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_encode_basestring_ascii.py +47 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_encode_for_html.py +38 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_errors.py +108 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_fail.py +180 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_float.py +46 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_for_json.py +128 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_free_threading.py +100 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_indent.py +86 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_item_sort_key.py +27 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_iterable.py +61 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_namedtuple.py +206 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_pass1.py +71 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_pass2.py +14 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_pass3.py +20 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_raw_json.py +47 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_recursion.py +67 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_scanstring.py +338 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_separators.py +42 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_speedups.py +329 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_str_subclass.py +21 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_subclass.py +37 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_subinterpreters.py +125 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_tool.py +101 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_tuple.py +47 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tests/test_unicode.py +154 -0
- kl_py-0.4.6/src/KL_Py/requests/simplejson/tool.py +41 -0
- kl_py-0.4.6/src/KL_Py/requests/urllib3/contrib/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py.egg-info/PKG-INFO +2 -1
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py.egg-info/SOURCES.txt +68 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py.egg-info/requires.txt +1 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/LICENSE +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/README.md +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/setup.cfg +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/_utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/base.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/button.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/calendar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/canvas.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/checkbox.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/column.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/combo.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/error.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/frame.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/graph.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/helpers.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/image.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/input.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/list_box.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/menu.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/multiline.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/option_menu.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/pane.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/progress_bar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/radio.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/separator.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/sizegrip.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/slider.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/spin.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/status_bar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/stretch.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/tab.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/table.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/text.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/elements/tree.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/themes.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/tray.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/FreeSimpleGUI/window.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_custom_pandas.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_custom_sqlite.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_custom_turtle.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_error_classes.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_filepaths.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_klang_builtins.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_translate.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/_web_translate.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/automl.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/dnd/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/drag_and_drop/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/export/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/fsgdnd/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/fsgui/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/_utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/base.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/button.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/calendar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/canvas.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/center.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/checkbox.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/column.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/combo.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/error.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/frame.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/graph.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/helpers.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/image.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/input.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/list_box.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/menu.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/multiline.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/option_menu.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/pane.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/progress_bar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/radio.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/separator.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/sizegrip.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/slider.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/spin.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/status_bar.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/stretch.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/tab.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/table.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/text.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/elements/tree.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/replace.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/tray.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/hindGui/window.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/k2exe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kexe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/kl2exe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klang2exe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klangexe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/klexe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/ml.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/np/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pd/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/plt/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/psgui/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/px/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pyexe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/pysgdnd/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/__version__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/_internal_utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/adapters.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/api.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/auth.py +0 -0
- {kl_py-0.4.4/src/KL_Py/requests/certifi → kl_py-0.4.6/src/KL_Py/requests/backports/zstd}/py.typed +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/certifi/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/certifi/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/certifi/core.py +0 -0
- {kl_py-0.4.4/src/KL_Py/requests/charset_normalizer → kl_py-0.4.6/src/KL_Py/requests/certifi}/py.typed +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/certs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/api.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/cd.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/cli/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/cli/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/constant.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/legacy.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/md.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/models.py +0 -0
- {kl_py-0.4.4/src/KL_Py/requests/idna → kl_py-0.4.6/src/KL_Py/requests/charset_normalizer}/py.typed +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/charset_normalizer/version.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/compat.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/cookies.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/exceptions.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/help.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/hooks.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/codec.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/compat.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/core.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/idnadata.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/intranges.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/package_data.py +0 -0
- /kl_py-0.4.4/src/KL_Py/requests/urllib3/contrib/__init__.py → /kl_py-0.4.6/src/KL_Py/requests/idna/py.typed +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/idna/uts46data.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/models.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/packages.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/sessions.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/status_codes.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/structures.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/_base_connection.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/_collections.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/_request_methods.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/_version.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/connection.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/connectionpool.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/emscripten/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/emscripten/connection.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/emscripten/fetch.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/emscripten/request.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/emscripten/response.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/pyopenssl.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/contrib/socks.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/exceptions.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/fields.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/filepost.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/http2/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/http2/connection.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/http2/probe.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/poolmanager.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/py.typed +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/response.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/connection.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/proxy.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/request.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/response.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/retry.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/ssl_.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/ssl_match_hostname.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/ssltransport.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/timeout.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/url.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/util.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/urllib3/util/wait.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/requests/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/sb/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/sk/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/sns/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/__init__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/__main__.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/config.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/dialogs.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/packaging.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/shims.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/ui.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/utils.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/toexe/validation.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py/when.py +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py.egg-info/dependency_links.txt +0 -0
- {kl_py-0.4.4 → kl_py-0.4.6}/src/KL_Py.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: KL_Py
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.6
|
|
4
4
|
Summary: A Python simplification module
|
|
5
5
|
Author-email: Abbaskhurram255 <abbaskhurram255@gmail.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -20,6 +20,7 @@ Requires-Dist: psgdnd
|
|
|
20
20
|
Requires-Dist: PySimpleGUI
|
|
21
21
|
Requires-Dist: FreeSimpleGUI
|
|
22
22
|
Requires-Dist: joblib
|
|
23
|
+
Requires-Dist: requests
|
|
23
24
|
Dynamic: license-file
|
|
24
25
|
|
|
25
26
|
# KL_Py
|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "KL_Py"
|
|
8
|
-
version = "0.4.
|
|
8
|
+
version = "0.4.6"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Abbaskhurram255", email = "abbaskhurram255@gmail.com" }
|
|
11
11
|
]
|
|
@@ -28,5 +28,6 @@ dependencies = [
|
|
|
28
28
|
"psgdnd",
|
|
29
29
|
"PySimpleGUI",
|
|
30
30
|
"FreeSimpleGUI",
|
|
31
|
-
"joblib"
|
|
31
|
+
"joblib",
|
|
32
|
+
"requests"
|
|
32
33
|
]
|
|
@@ -69,10 +69,32 @@ NON_NUM_RE: str = r"[^Ee\+\-\.\d]|(?<=[A-Za-z_])[Ee]|[Ee\.](?![\d\+\-])|(?<![^\d
|
|
|
69
69
|
INT_RE = INTEGEGER_RE = INT_REGEX = INTEGEGER_REGEX = r"\-?\d+"
|
|
70
70
|
WORD_RE = WORD_REGEX = r"[A-Za-z_\'][\w\']*(?:\-[A-Za-z_\']\w*(?: [A-Za-z_\'][\w\']*){0})*"
|
|
71
71
|
NON_WORD_RE = NON_WORD_REGEX = r"[^A-Za-z_\-]|\-(?![A-Za-z_])"
|
|
72
|
-
def __rgx_is_full_match__(
|
|
72
|
+
def __rgx_is_full_match__(
|
|
73
|
+
pattern,
|
|
74
|
+
s
|
|
75
|
+
):
|
|
76
|
+
return bool(
|
|
77
|
+
re.search(
|
|
78
|
+
f"^{pattern}$",
|
|
79
|
+
str(s)\
|
|
80
|
+
if s is not None\
|
|
81
|
+
else ""
|
|
82
|
+
)
|
|
83
|
+
)
|
|
73
84
|
def __rgx_catch__(pattern, s) -> str | list[str]:
|
|
74
|
-
matches: list[str] = re.findall(
|
|
75
|
-
|
|
85
|
+
matches: list[str] = re.findall(
|
|
86
|
+
pattern,
|
|
87
|
+
str(s)\
|
|
88
|
+
if s is not None\
|
|
89
|
+
else ""
|
|
90
|
+
)
|
|
91
|
+
matches = [
|
|
92
|
+
m for m in matches\
|
|
93
|
+
if m
|
|
94
|
+
]
|
|
95
|
+
return matches[0]\
|
|
96
|
+
if len(matches) == 1\
|
|
97
|
+
else matches
|
|
76
98
|
jumle_me_he = lafz_me_he = lambda y, x: re.search(y, x) or False if isinstance(y, str) and isinstance(x, str) else False
|
|
77
99
|
is_mail = is_email = ismail = isemail = lambda s: __rgx_is_full_match__(MAIL_RE, s)
|
|
78
100
|
he_mail = hemail = he_email = heemail = is_mail
|
|
@@ -520,7 +542,7 @@ def rand_range(start: int = 9, stop: int|None = None) -> list[int]:
|
|
|
520
542
|
for _ in range(length)
|
|
521
543
|
]
|
|
522
544
|
randrange = rand_range
|
|
523
|
-
def randphone(cc: str = "92"
|
|
545
|
+
def randphone(n=1, cc: str = "92") -> str:
|
|
524
546
|
if not isinstance(
|
|
525
547
|
n,
|
|
526
548
|
int
|
|
@@ -550,9 +572,15 @@ def randphone(cc: str = "92", n=1) -> str:
|
|
|
550
572
|
str
|
|
551
573
|
] = []
|
|
552
574
|
for _ in range(n):
|
|
553
|
-
num: str = f"+{cc}"
|
|
575
|
+
num: str = f"+{cc}3"
|
|
554
576
|
if cc == "92":
|
|
555
|
-
num +=
|
|
577
|
+
num += str(
|
|
578
|
+
random\
|
|
579
|
+
.randint(
|
|
580
|
+
0,
|
|
581
|
+
4
|
|
582
|
+
)
|
|
583
|
+
)
|
|
556
584
|
else:
|
|
557
585
|
num += str(
|
|
558
586
|
random\
|
|
@@ -570,7 +598,7 @@ def randphone(cc: str = "92", n=1) -> str:
|
|
|
570
598
|
9
|
|
571
599
|
)\
|
|
572
600
|
for _\
|
|
573
|
-
in range(
|
|
601
|
+
in range(8)
|
|
574
602
|
]
|
|
575
603
|
]
|
|
576
604
|
)
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"""Python bindings to the Zstandard (zstd) compression library (RFC-8878)."""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
if not ((3, 10) <= sys.version_info < (3, 14)):
|
|
5
|
+
raise RuntimeError(f"Unsupported Python version: {sys.version}")
|
|
6
|
+
|
|
7
|
+
__all__ = (
|
|
8
|
+
# backports.zstd
|
|
9
|
+
'COMPRESSION_LEVEL_DEFAULT',
|
|
10
|
+
'compress',
|
|
11
|
+
'CompressionParameter',
|
|
12
|
+
'decompress',
|
|
13
|
+
'DecompressionParameter',
|
|
14
|
+
'finalize_dict',
|
|
15
|
+
'get_frame_info',
|
|
16
|
+
'Strategy',
|
|
17
|
+
'train_dict',
|
|
18
|
+
|
|
19
|
+
# backports.zstd._shutil
|
|
20
|
+
'register_shutil',
|
|
21
|
+
|
|
22
|
+
# backports.zstd._zstdfile
|
|
23
|
+
'open',
|
|
24
|
+
'ZstdFile',
|
|
25
|
+
|
|
26
|
+
# backports.zstd._zstd
|
|
27
|
+
'get_frame_size',
|
|
28
|
+
'zstd_version',
|
|
29
|
+
'zstd_version_info',
|
|
30
|
+
'ZstdCompressor',
|
|
31
|
+
'ZstdDecompressor',
|
|
32
|
+
'ZstdDict',
|
|
33
|
+
'ZstdError',
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
import backports.zstd._zstd as _zstd
|
|
37
|
+
import enum
|
|
38
|
+
from backports.zstd._zstd import (ZstdCompressor, ZstdDecompressor, ZstdDict, ZstdError,
|
|
39
|
+
get_frame_size, zstd_version)
|
|
40
|
+
from backports.zstd._zstdfile import ZstdFile, open, _nbytes
|
|
41
|
+
|
|
42
|
+
# zstd_version_number is (MAJOR * 100 * 100 + MINOR * 100 + RELEASE)
|
|
43
|
+
zstd_version_info = (*divmod(_zstd.zstd_version_number // 100, 100),
|
|
44
|
+
_zstd.zstd_version_number % 100)
|
|
45
|
+
"""Version number of the runtime zstd library as a tuple of integers."""
|
|
46
|
+
|
|
47
|
+
if zstd_version_info < (1, 4, 5):
|
|
48
|
+
raise RuntimeError("zstd version is too old")
|
|
49
|
+
|
|
50
|
+
COMPRESSION_LEVEL_DEFAULT = _zstd.ZSTD_CLEVEL_DEFAULT
|
|
51
|
+
"""The default compression level for Zstandard, currently '3'."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class FrameInfo:
|
|
55
|
+
"""Information about a Zstandard frame."""
|
|
56
|
+
|
|
57
|
+
__slots__ = 'decompressed_size', 'dictionary_id'
|
|
58
|
+
|
|
59
|
+
def __init__(self, decompressed_size, dictionary_id):
|
|
60
|
+
super().__setattr__('decompressed_size', decompressed_size)
|
|
61
|
+
super().__setattr__('dictionary_id', dictionary_id)
|
|
62
|
+
|
|
63
|
+
def __repr__(self):
|
|
64
|
+
return (f'FrameInfo(decompressed_size={self.decompressed_size}, '
|
|
65
|
+
f'dictionary_id={self.dictionary_id})')
|
|
66
|
+
|
|
67
|
+
def __setattr__(self, name, _):
|
|
68
|
+
raise AttributeError(f"can't set attribute {name!r}")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def get_frame_info(frame_buffer):
|
|
72
|
+
"""Get Zstandard frame information from a frame header.
|
|
73
|
+
|
|
74
|
+
*frame_buffer* is a bytes-like object. It should start from the
|
|
75
|
+
beginning of a frame, and needs to include at least the frame header
|
|
76
|
+
(6 to 18 bytes).
|
|
77
|
+
|
|
78
|
+
The returned FrameInfo object has two attributes.
|
|
79
|
+
'decompressed_size' is the size in bytes of the data in the frame when
|
|
80
|
+
decompressed, or None when the decompressed size is unknown.
|
|
81
|
+
'dictionary_id' is an int in the range (0, 2**32). The special value 0
|
|
82
|
+
means that the dictionary ID was not recorded in the frame header,
|
|
83
|
+
the frame may or may not need a dictionary to be decoded,
|
|
84
|
+
and the ID of such a dictionary is not specified.
|
|
85
|
+
"""
|
|
86
|
+
return FrameInfo(*_zstd.get_frame_info(frame_buffer))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def train_dict(samples, dict_size):
|
|
90
|
+
"""Return a ZstdDict representing a trained Zstandard dictionary.
|
|
91
|
+
|
|
92
|
+
*samples* is an iterable of samples, where a sample is a bytes-like
|
|
93
|
+
object representing a file.
|
|
94
|
+
|
|
95
|
+
*dict_size* is the dictionary's maximum size, in bytes.
|
|
96
|
+
"""
|
|
97
|
+
if not isinstance(dict_size, int):
|
|
98
|
+
ds_cls = type(dict_size).__qualname__
|
|
99
|
+
raise TypeError(f'dict_size must be an int object, not {ds_cls!r}.')
|
|
100
|
+
|
|
101
|
+
samples = tuple(samples)
|
|
102
|
+
chunks = b''.join(samples)
|
|
103
|
+
chunk_sizes = tuple(_nbytes(sample) for sample in samples)
|
|
104
|
+
if not chunks:
|
|
105
|
+
raise ValueError("samples contained no data; can't train dictionary.")
|
|
106
|
+
dict_content = _zstd.train_dict(chunks, chunk_sizes, dict_size)
|
|
107
|
+
return ZstdDict(dict_content)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def finalize_dict(zstd_dict, /, samples, dict_size, level):
|
|
111
|
+
"""Return a ZstdDict representing a finalized Zstandard dictionary.
|
|
112
|
+
|
|
113
|
+
Given a custom content as a basis for dictionary, and a set of samples,
|
|
114
|
+
finalize *zstd_dict* by adding headers and statistics according to the
|
|
115
|
+
Zstandard dictionary format.
|
|
116
|
+
|
|
117
|
+
You may compose an effective dictionary content by hand, which is used
|
|
118
|
+
as basis dictionary, and use some samples to finalize a dictionary. The
|
|
119
|
+
basis dictionary may be a "raw content" dictionary. See *is_raw* in
|
|
120
|
+
ZstdDict.
|
|
121
|
+
|
|
122
|
+
*samples* is an iterable of samples, where a sample is a bytes-like
|
|
123
|
+
object representing a file.
|
|
124
|
+
*dict_size* is the dictionary's maximum size, in bytes.
|
|
125
|
+
*level* is the expected compression level. The statistics for each
|
|
126
|
+
compression level differ, so tuning the dictionary to the compression
|
|
127
|
+
level can provide improvements.
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
if not isinstance(zstd_dict, ZstdDict):
|
|
131
|
+
raise TypeError('zstd_dict argument should be a ZstdDict object.')
|
|
132
|
+
if not isinstance(dict_size, int):
|
|
133
|
+
raise TypeError('dict_size argument should be an int object.')
|
|
134
|
+
if not isinstance(level, int):
|
|
135
|
+
raise TypeError('level argument should be an int object.')
|
|
136
|
+
|
|
137
|
+
samples = tuple(samples)
|
|
138
|
+
chunks = b''.join(samples)
|
|
139
|
+
chunk_sizes = tuple(_nbytes(sample) for sample in samples)
|
|
140
|
+
if not chunks:
|
|
141
|
+
raise ValueError("The samples are empty content, can't finalize the "
|
|
142
|
+
"dictionary.")
|
|
143
|
+
dict_content = _zstd.finalize_dict(zstd_dict.dict_content, chunks,
|
|
144
|
+
chunk_sizes, dict_size, level)
|
|
145
|
+
return ZstdDict(dict_content)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def compress(data, level=None, options=None, zstd_dict=None):
|
|
149
|
+
"""Return Zstandard compressed *data* as bytes.
|
|
150
|
+
|
|
151
|
+
*level* is an int specifying the compression level to use, defaulting to
|
|
152
|
+
COMPRESSION_LEVEL_DEFAULT ('3').
|
|
153
|
+
*options* is a dict object that contains advanced compression
|
|
154
|
+
parameters. See CompressionParameter for more on options.
|
|
155
|
+
*zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary.
|
|
156
|
+
See the function train_dict for how to train a ZstdDict on sample data.
|
|
157
|
+
|
|
158
|
+
For incremental compression, use a ZstdCompressor instead.
|
|
159
|
+
"""
|
|
160
|
+
comp = ZstdCompressor(level=level, options=options, zstd_dict=zstd_dict)
|
|
161
|
+
return comp.compress(data, mode=ZstdCompressor.FLUSH_FRAME)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def decompress(data, zstd_dict=None, options=None):
|
|
165
|
+
"""Decompress one or more frames of Zstandard compressed *data*.
|
|
166
|
+
|
|
167
|
+
*zstd_dict* is a ZstdDict object, a pre-trained Zstandard dictionary.
|
|
168
|
+
See the function train_dict for how to train a ZstdDict on sample data.
|
|
169
|
+
*options* is a dict object that contains advanced compression
|
|
170
|
+
parameters. See DecompressionParameter for more on options.
|
|
171
|
+
|
|
172
|
+
For incremental decompression, use a ZstdDecompressor instead.
|
|
173
|
+
"""
|
|
174
|
+
results = []
|
|
175
|
+
while True:
|
|
176
|
+
decomp = ZstdDecompressor(options=options, zstd_dict=zstd_dict)
|
|
177
|
+
results.append(decomp.decompress(data))
|
|
178
|
+
if not decomp.eof:
|
|
179
|
+
raise ZstdError('Compressed data ended before the '
|
|
180
|
+
'end-of-stream marker was reached')
|
|
181
|
+
data = decomp.unused_data
|
|
182
|
+
if not data:
|
|
183
|
+
break
|
|
184
|
+
return b''.join(results)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class CompressionParameter(enum.IntEnum):
|
|
188
|
+
"""Compression parameters."""
|
|
189
|
+
|
|
190
|
+
compression_level = _zstd.ZSTD_c_compressionLevel
|
|
191
|
+
window_log = _zstd.ZSTD_c_windowLog
|
|
192
|
+
hash_log = _zstd.ZSTD_c_hashLog
|
|
193
|
+
chain_log = _zstd.ZSTD_c_chainLog
|
|
194
|
+
search_log = _zstd.ZSTD_c_searchLog
|
|
195
|
+
min_match = _zstd.ZSTD_c_minMatch
|
|
196
|
+
target_length = _zstd.ZSTD_c_targetLength
|
|
197
|
+
strategy = _zstd.ZSTD_c_strategy
|
|
198
|
+
|
|
199
|
+
enable_long_distance_matching = _zstd.ZSTD_c_enableLongDistanceMatching
|
|
200
|
+
ldm_hash_log = _zstd.ZSTD_c_ldmHashLog
|
|
201
|
+
ldm_min_match = _zstd.ZSTD_c_ldmMinMatch
|
|
202
|
+
ldm_bucket_size_log = _zstd.ZSTD_c_ldmBucketSizeLog
|
|
203
|
+
ldm_hash_rate_log = _zstd.ZSTD_c_ldmHashRateLog
|
|
204
|
+
|
|
205
|
+
content_size_flag = _zstd.ZSTD_c_contentSizeFlag
|
|
206
|
+
checksum_flag = _zstd.ZSTD_c_checksumFlag
|
|
207
|
+
dict_id_flag = _zstd.ZSTD_c_dictIDFlag
|
|
208
|
+
|
|
209
|
+
nb_workers = _zstd.ZSTD_c_nbWorkers
|
|
210
|
+
job_size = _zstd.ZSTD_c_jobSize
|
|
211
|
+
overlap_log = _zstd.ZSTD_c_overlapLog
|
|
212
|
+
|
|
213
|
+
def bounds(self):
|
|
214
|
+
"""Return the (lower, upper) int bounds of a compression parameter.
|
|
215
|
+
|
|
216
|
+
Both the lower and upper bounds are inclusive.
|
|
217
|
+
"""
|
|
218
|
+
return _zstd.get_param_bounds(self.value, is_compress=True)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class DecompressionParameter(enum.IntEnum):
|
|
222
|
+
"""Decompression parameters."""
|
|
223
|
+
|
|
224
|
+
window_log_max = _zstd.ZSTD_d_windowLogMax
|
|
225
|
+
|
|
226
|
+
def bounds(self):
|
|
227
|
+
"""Return the (lower, upper) int bounds of a decompression parameter.
|
|
228
|
+
|
|
229
|
+
Both the lower and upper bounds are inclusive.
|
|
230
|
+
"""
|
|
231
|
+
return _zstd.get_param_bounds(self.value, is_compress=False)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
class Strategy(enum.IntEnum):
|
|
235
|
+
"""Compression strategies, listed from fastest to strongest.
|
|
236
|
+
|
|
237
|
+
Note that new strategies might be added in the future.
|
|
238
|
+
Only the order (from fast to strong) is guaranteed,
|
|
239
|
+
the numeric value might change.
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
fast = _zstd.ZSTD_fast
|
|
243
|
+
dfast = _zstd.ZSTD_dfast
|
|
244
|
+
greedy = _zstd.ZSTD_greedy
|
|
245
|
+
lazy = _zstd.ZSTD_lazy
|
|
246
|
+
lazy2 = _zstd.ZSTD_lazy2
|
|
247
|
+
btlazy2 = _zstd.ZSTD_btlazy2
|
|
248
|
+
btopt = _zstd.ZSTD_btopt
|
|
249
|
+
btultra = _zstd.ZSTD_btultra
|
|
250
|
+
btultra2 = _zstd.ZSTD_btultra2
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# Check validity of the CompressionParameter & DecompressionParameter types
|
|
254
|
+
_zstd.set_parameter_types(CompressionParameter, DecompressionParameter)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
# Lazy loading
|
|
258
|
+
def __getattr__(name):
|
|
259
|
+
if name == "register_shutil":
|
|
260
|
+
from backports.zstd._shutil import register_shutil
|
|
261
|
+
return register_shutil
|
|
262
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import enum
|
|
2
|
+
from io import BufferedIOBase, TextIOWrapper, _WrappedBuffer
|
|
3
|
+
from typing import (
|
|
4
|
+
Any,
|
|
5
|
+
Final,
|
|
6
|
+
Iterable,
|
|
7
|
+
Literal,
|
|
8
|
+
Mapping,
|
|
9
|
+
Protocol,
|
|
10
|
+
Self,
|
|
11
|
+
TypeAlias,
|
|
12
|
+
final,
|
|
13
|
+
overload,
|
|
14
|
+
type_check_only,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
from _typeshed import ReadableBuffer, StrOrBytesPath, SupportsWrite, WriteableBuffer
|
|
18
|
+
|
|
19
|
+
@type_check_only
|
|
20
|
+
class _streams_Reader(Protocol):
|
|
21
|
+
def read(self, n: int, /) -> bytes: ...
|
|
22
|
+
def seekable(self) -> bool: ...
|
|
23
|
+
def seek(self, n: int, /) -> Any: ...
|
|
24
|
+
|
|
25
|
+
@type_check_only
|
|
26
|
+
class _streams_BaseStream(BufferedIOBase): ...
|
|
27
|
+
|
|
28
|
+
#
|
|
29
|
+
# __init__.py
|
|
30
|
+
#
|
|
31
|
+
|
|
32
|
+
__all__ = (
|
|
33
|
+
# backports.zstd
|
|
34
|
+
"COMPRESSION_LEVEL_DEFAULT",
|
|
35
|
+
"compress",
|
|
36
|
+
"CompressionParameter",
|
|
37
|
+
"decompress",
|
|
38
|
+
"DecompressionParameter",
|
|
39
|
+
"finalize_dict",
|
|
40
|
+
"get_frame_info",
|
|
41
|
+
"Strategy",
|
|
42
|
+
"train_dict",
|
|
43
|
+
# backports.zstd._shutil
|
|
44
|
+
"register_shutil",
|
|
45
|
+
# backports.zstd._zstdfile
|
|
46
|
+
"open",
|
|
47
|
+
"ZstdFile",
|
|
48
|
+
# backports.zstd._zstd
|
|
49
|
+
"get_frame_size",
|
|
50
|
+
"zstd_version",
|
|
51
|
+
"zstd_version_info",
|
|
52
|
+
"ZstdCompressor",
|
|
53
|
+
"ZstdDecompressor",
|
|
54
|
+
"ZstdDict",
|
|
55
|
+
"ZstdError",
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
zstd_version_info: Final[tuple[int, int, int]]
|
|
59
|
+
COMPRESSION_LEVEL_DEFAULT: Final[int] = ...
|
|
60
|
+
|
|
61
|
+
class FrameInfo:
|
|
62
|
+
__slots__ = ("decompressed_size", "dictionary_id")
|
|
63
|
+
decompressed_size: int
|
|
64
|
+
dictionary_id: int
|
|
65
|
+
def __init__(self, decompressed_size: int, dictionary_id: int) -> None: ...
|
|
66
|
+
|
|
67
|
+
def get_frame_info(frame_buffer: ReadableBuffer) -> FrameInfo: ...
|
|
68
|
+
def train_dict(samples: Iterable[ReadableBuffer], dict_size: int) -> ZstdDict: ...
|
|
69
|
+
def finalize_dict(zstd_dict: ZstdDict, /, samples: Iterable[ReadableBuffer], dict_size: int, level: int) -> ZstdDict: ...
|
|
70
|
+
def compress(
|
|
71
|
+
data: ReadableBuffer,
|
|
72
|
+
level: int | None = None,
|
|
73
|
+
options: Mapping[int, int] | None = None,
|
|
74
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
75
|
+
) -> bytes: ...
|
|
76
|
+
def decompress(
|
|
77
|
+
data: ReadableBuffer, zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, options: Mapping[int, int] | None = None
|
|
78
|
+
) -> bytes: ...
|
|
79
|
+
|
|
80
|
+
@final
|
|
81
|
+
class CompressionParameter(enum.IntEnum):
|
|
82
|
+
compression_level = ...
|
|
83
|
+
window_log = ...
|
|
84
|
+
hash_log = ...
|
|
85
|
+
chain_log = ...
|
|
86
|
+
search_log = ...
|
|
87
|
+
min_match = ...
|
|
88
|
+
target_length = ...
|
|
89
|
+
strategy = ...
|
|
90
|
+
enable_long_distance_matching = ...
|
|
91
|
+
ldm_hash_log = ...
|
|
92
|
+
ldm_min_match = ...
|
|
93
|
+
ldm_bucket_size_log = ...
|
|
94
|
+
ldm_hash_rate_log = ...
|
|
95
|
+
content_size_flag = ...
|
|
96
|
+
checksum_flag = ...
|
|
97
|
+
dict_id_flag = ...
|
|
98
|
+
nb_workers = ...
|
|
99
|
+
job_size = ...
|
|
100
|
+
overlap_log = ...
|
|
101
|
+
def bounds(self) -> tuple[int, int]: ...
|
|
102
|
+
|
|
103
|
+
@final
|
|
104
|
+
class DecompressionParameter(enum.IntEnum):
|
|
105
|
+
window_log_max = ...
|
|
106
|
+
def bounds(self) -> tuple[int, int]: ...
|
|
107
|
+
|
|
108
|
+
@final
|
|
109
|
+
class Strategy(enum.IntEnum):
|
|
110
|
+
fast = ...
|
|
111
|
+
dfast = ...
|
|
112
|
+
greedy = ...
|
|
113
|
+
lazy = ...
|
|
114
|
+
lazy2 = ...
|
|
115
|
+
btlazy2 = ...
|
|
116
|
+
btopt = ...
|
|
117
|
+
btultra = ...
|
|
118
|
+
btultra2 = ...
|
|
119
|
+
|
|
120
|
+
#
|
|
121
|
+
# _shutil
|
|
122
|
+
#
|
|
123
|
+
|
|
124
|
+
def register_shutil(*, tar: bool = True, zip: bool = True) -> None: ...
|
|
125
|
+
|
|
126
|
+
#
|
|
127
|
+
# _zstdfile
|
|
128
|
+
#
|
|
129
|
+
|
|
130
|
+
_ReadBinaryMode: TypeAlias = Literal["r", "rb"]
|
|
131
|
+
_WriteBinaryMode: TypeAlias = Literal["w", "wb", "x", "xb", "a", "ab"]
|
|
132
|
+
_ReadTextMode: TypeAlias = Literal["rt"]
|
|
133
|
+
_WriteTextMode: TypeAlias = Literal["wt", "xt", "at"]
|
|
134
|
+
|
|
135
|
+
@type_check_only
|
|
136
|
+
class _FileBinaryRead(_streams_Reader, Protocol):
|
|
137
|
+
def close(self) -> None: ...
|
|
138
|
+
|
|
139
|
+
@type_check_only
|
|
140
|
+
class _FileBinaryWrite(SupportsWrite[bytes], Protocol):
|
|
141
|
+
def close(self) -> None: ...
|
|
142
|
+
|
|
143
|
+
class ZstdFile(_streams_BaseStream):
|
|
144
|
+
FLUSH_BLOCK = ZstdCompressor.FLUSH_BLOCK
|
|
145
|
+
FLUSH_FRAME = ZstdCompressor.FLUSH_FRAME
|
|
146
|
+
|
|
147
|
+
@overload
|
|
148
|
+
def __init__(
|
|
149
|
+
self,
|
|
150
|
+
file: StrOrBytesPath | _FileBinaryRead,
|
|
151
|
+
/,
|
|
152
|
+
mode: _ReadBinaryMode = "r",
|
|
153
|
+
*,
|
|
154
|
+
level: None = None,
|
|
155
|
+
options: Mapping[int, int] | None = None,
|
|
156
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
157
|
+
) -> None: ...
|
|
158
|
+
@overload
|
|
159
|
+
def __init__(
|
|
160
|
+
self,
|
|
161
|
+
file: StrOrBytesPath | _FileBinaryWrite,
|
|
162
|
+
/,
|
|
163
|
+
mode: _WriteBinaryMode,
|
|
164
|
+
*,
|
|
165
|
+
level: int | None = None,
|
|
166
|
+
options: Mapping[int, int] | None = None,
|
|
167
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
168
|
+
) -> None: ...
|
|
169
|
+
|
|
170
|
+
def write(self, data: ReadableBuffer, /) -> int: ...
|
|
171
|
+
def flush(self, mode: _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 1) -> bytes: ... # type: ignore[override]
|
|
172
|
+
def read(self, size: int | None = -1) -> bytes: ...
|
|
173
|
+
def read1(self, size: int | None = -1) -> bytes: ...
|
|
174
|
+
def readinto(self, b: WriteableBuffer) -> int: ...
|
|
175
|
+
def readinto1(self, b: WriteableBuffer) -> int: ...
|
|
176
|
+
def readline(self, size: int | None = -1) -> bytes: ...
|
|
177
|
+
def seek(self, offset: int, whence: int = 0) -> int: ...
|
|
178
|
+
def peek(self, size: int = -1) -> bytes: ...
|
|
179
|
+
@property
|
|
180
|
+
def name(self) -> str | bytes: ...
|
|
181
|
+
@property
|
|
182
|
+
def mode(self) -> Literal["rb", "wb"]: ...
|
|
183
|
+
|
|
184
|
+
@overload
|
|
185
|
+
def open(
|
|
186
|
+
file: StrOrBytesPath | _FileBinaryRead,
|
|
187
|
+
/,
|
|
188
|
+
mode: _ReadBinaryMode = "rb",
|
|
189
|
+
*,
|
|
190
|
+
level: None = None,
|
|
191
|
+
options: Mapping[int, int] | None = None,
|
|
192
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
193
|
+
encoding: str | None = None,
|
|
194
|
+
errors: str | None = None,
|
|
195
|
+
newline: str | None = None,
|
|
196
|
+
) -> ZstdFile: ...
|
|
197
|
+
@overload
|
|
198
|
+
def open(
|
|
199
|
+
file: StrOrBytesPath | _FileBinaryWrite,
|
|
200
|
+
/,
|
|
201
|
+
mode: _WriteBinaryMode,
|
|
202
|
+
*,
|
|
203
|
+
level: int | None = None,
|
|
204
|
+
options: Mapping[int, int] | None = None,
|
|
205
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
206
|
+
encoding: str | None = None,
|
|
207
|
+
errors: str | None = None,
|
|
208
|
+
newline: str | None = None,
|
|
209
|
+
) -> ZstdFile: ...
|
|
210
|
+
@overload
|
|
211
|
+
def open(
|
|
212
|
+
file: StrOrBytesPath | _WrappedBuffer,
|
|
213
|
+
/,
|
|
214
|
+
mode: _ReadTextMode,
|
|
215
|
+
*,
|
|
216
|
+
level: None = None,
|
|
217
|
+
options: Mapping[int, int] | None = None,
|
|
218
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
219
|
+
encoding: str | None = None,
|
|
220
|
+
errors: str | None = None,
|
|
221
|
+
newline: str | None = None,
|
|
222
|
+
) -> TextIOWrapper: ...
|
|
223
|
+
@overload
|
|
224
|
+
def open(
|
|
225
|
+
file: StrOrBytesPath | _WrappedBuffer,
|
|
226
|
+
/,
|
|
227
|
+
mode: _WriteTextMode,
|
|
228
|
+
*,
|
|
229
|
+
level: int | None = None,
|
|
230
|
+
options: Mapping[int, int] | None = None,
|
|
231
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
232
|
+
encoding: str | None = None,
|
|
233
|
+
errors: str | None = None,
|
|
234
|
+
newline: str | None = None,
|
|
235
|
+
) -> TextIOWrapper: ...
|
|
236
|
+
|
|
237
|
+
#
|
|
238
|
+
# _zstd
|
|
239
|
+
#
|
|
240
|
+
|
|
241
|
+
_ZstdCompressorContinue: TypeAlias = Literal[0]
|
|
242
|
+
_ZstdCompressorFlushBlock: TypeAlias = Literal[1]
|
|
243
|
+
_ZstdCompressorFlushFrame: TypeAlias = Literal[2]
|
|
244
|
+
|
|
245
|
+
@final
|
|
246
|
+
class ZstdCompressor:
|
|
247
|
+
CONTINUE: Final = 0
|
|
248
|
+
FLUSH_BLOCK: Final = 1
|
|
249
|
+
FLUSH_FRAME: Final = 2
|
|
250
|
+
def __new__(
|
|
251
|
+
cls,
|
|
252
|
+
level: int | None = None,
|
|
253
|
+
options: Mapping[int, int] | None = None,
|
|
254
|
+
zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None,
|
|
255
|
+
) -> Self: ...
|
|
256
|
+
def compress(
|
|
257
|
+
self, /, data: ReadableBuffer, mode: _ZstdCompressorContinue | _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 0
|
|
258
|
+
) -> bytes: ...
|
|
259
|
+
def flush(self, /, mode: _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame = 2) -> bytes: ...
|
|
260
|
+
def set_pledged_input_size(self, size: int | None, /) -> None: ...
|
|
261
|
+
@property
|
|
262
|
+
def last_mode(self) -> _ZstdCompressorContinue | _ZstdCompressorFlushBlock | _ZstdCompressorFlushFrame: ...
|
|
263
|
+
|
|
264
|
+
@final
|
|
265
|
+
class ZstdDecompressor:
|
|
266
|
+
def __new__(
|
|
267
|
+
cls, zstd_dict: ZstdDict | tuple[ZstdDict, int] | None = None, options: Mapping[int, int] | None = None
|
|
268
|
+
) -> Self: ...
|
|
269
|
+
def decompress(self, /, data: ReadableBuffer, max_length: int = -1) -> bytes: ...
|
|
270
|
+
@property
|
|
271
|
+
def eof(self) -> bool: ...
|
|
272
|
+
@property
|
|
273
|
+
def needs_input(self) -> bool: ...
|
|
274
|
+
@property
|
|
275
|
+
def unused_data(self) -> bytes: ...
|
|
276
|
+
|
|
277
|
+
@final
|
|
278
|
+
class ZstdDict:
|
|
279
|
+
def __new__(cls, dict_content: ReadableBuffer, /, *, is_raw: bool = False) -> Self: ...
|
|
280
|
+
def __len__(self, /) -> int: ...
|
|
281
|
+
@property
|
|
282
|
+
def as_digested_dict(self) -> tuple[Self, int]: ...
|
|
283
|
+
@property
|
|
284
|
+
def as_prefix(self) -> tuple[Self, int]: ...
|
|
285
|
+
@property
|
|
286
|
+
def as_undigested_dict(self) -> tuple[Self, int]: ...
|
|
287
|
+
@property
|
|
288
|
+
def dict_content(self) -> bytes: ...
|
|
289
|
+
@property
|
|
290
|
+
def dict_id(self) -> int: ...
|
|
291
|
+
|
|
292
|
+
class ZstdError(Exception): ...
|
|
293
|
+
|
|
294
|
+
def get_frame_size(frame_buffer: ReadableBuffer) -> int: ...
|
|
295
|
+
|
|
296
|
+
zstd_version: Final[str]
|
|
297
|
+
zstd_version_number: Final[int]
|