{ "info": { "author": "AivanF.", "author_email": "projects@aivanf.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Information Technology", "License :: Freely Distributable", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Security", "Topic :: System :: Filesystems", "Topic :: Utilities" ], "description": "# Idea\nThis is a tiny Python library and command line utility for splitting any binary files into meaningless parts and combining them back. \n\nIt can be useful for storing or transferring some kind of valuable data.\nWhile most of modern technologies try to encrypt such data\n(though any encription can be hacked, thanks to quantum computing),\nkeeping the data away is a timeless approach.\nEspecially if the data is divided into multiple parts, and each part separately is just useless.\n\n# Algorithm\n\nIf you have a file with L bytes, and you want to split it into N parts,\nthen the algorithm will divide your file into groups of bytes with size N,\nand each byte of the group will be written into corresponding part.\n\nLet's consider an example, a small file with 12 bytes which we want to devide into 3 parts:\n\n 12 88 64 97 70 52 76 63 57 02 91 24\n\nIt is divided into 4 groups of 3 bytes each:\n\n (12 88 64) (97 70 52) (76 63 57) (02 91 24)\n\nWhich are written as 3 parts:\n\n1. `12 97 76 02`\n2. `88 70 63 91`\n3. `64 52 57 24`\n\nIf a file size is not divisible by parts count, then the last group just won't be full,\nand the parts will have a bit (a byte, to be precise) different size.\n\nOf course, the algorithm works much better for the files with compression,\nand worse for the row data (having every 3d or 5th letter of a text is not so bad).\nLuckily, we can archive any file!\nMoreover, many popular formats of pictures, music and video use compression by default.\n\n# Installation\n\nYou can download Python file from [GitHub repository](https://github.com/AivanF/ByteSplitter), or simply use PyPI:\n\n pip install ByteSplitter\n\n# Command line usage patterns\n\nAfter installation using `pip`, you can use the utility:\n\n1\\. Splitting of a file with default names of parts:\n\n- `split `\n\n2\\. Splitting of a file with specified names of parts:\n\n- `split ` \n\n3\\. Combining of a file with default names of parts:\n\n- `combine `\n\n4\\. Combining of a file with specified names of parts:\n\n- `combine ...`\n\n# Command line usage examples\n\nCheck the [example folder](https://github.com/AivanF/ByteSplitter/tree/master/example):\n\n1\\. Combine user-named part files into whole `result.png`:\n\n- `bysp combine result.png p3 p14 p15`\n\n2\\. Split the file into 2 parts with custom names:\n\n- `bysp split result.png abc def`\n\n3\\. Split the file into 10 parts with automatically given names `result.png.0.part`, ..., `result.png.9.part`:\n\n- `bysp s result.png 10`\n\n4\\. Combine automatically named parts into whole file (Count of parts mustn't be specified if the files have default names):\n\n- `bysp c new-result.png`\n\nAlso, you can call BySp in a Python module way: `python -m bysp` or as usual Python file: `bysp.py` (with provided path).\n\n# Python usage\n\nByteSplitter can be used as a regular Python library: `import bysp`. The code consists of single file and several simple functions with docstrings, so you can easily understand it. The code works well on both Python 2 & 3. Briefly, the functions are:\n\n## split_io\n\nReturns a list of parts as file-like objects.\n\n- `whole` \u2013 a file-like, the data to split.\n- `split_count` \u2013 count of parts.\n\n## split_file\n\nSplits a file into parts, then save them to the disk or return a list with parts.\n\n- `whole` \u2013 filename or file-like object to split.\n- `split_count = None` \u2013 count of parts to create; can be passed, if `parts` is given).\n- `parts = None` \u2013 custom filenames of parts; if not given, default generated names will be used.\n- `save = True` \u2013 if should save parts to the disk, or return a list of file-like objects.\n\n## combine_io\n\nReturns file-like object as a combination of given parts\n\n- `parts` \u2013 a list of file-like objects.\n\n## combine_file\n\nCombines given parts, then saves final file to the disk or returns it as a file-like object.\n\n- `filename = None` \u2013 filename.\n- `parts = None` \u2013 a list of file-like objects or filenames; if not given, then `filename` aegument will be used to find the parts.\n- `save = True` \u2013 if should save final file to the disk, or return it as a file-like object.\n\n---\n\nAs you can see, the `*_file` functions work the same as `*_io` functions, but have many optional arguments, so are more flexible.\n\n## License\n\n This software is provided 'as-is', without any express or implied warranty.\n You may not hold the author liable.\n\n Permission is granted to anyone to use this software for any purpose,\n including commercial applications, and to alter it and redistribute it freely,\n subject to the following restrictions:\n\n The origin of this software must not be misrepresented. You must not claim\n that you wrote the original software. When use the software, you must give\n appropriate credit, provide an active link to the original file, and indicate if changes were made.\n This notice may not be removed or altered from any source distribution.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AivanF/ByteSplitter", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ByteSplitter", "package_url": "https://pypi.org/project/ByteSplitter/", "platform": "", "project_url": "https://pypi.org/project/ByteSplitter/", "project_urls": { "Homepage": "https://github.com/AivanF/ByteSplitter" }, "release_url": "https://pypi.org/project/ByteSplitter/1.0.4/", "requires_dist": null, "requires_python": "", "summary": "A tiny Python utility for splitting any binary files into parts and combining them back", "version": "1.0.4" }, "last_serial": 4865943, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "11808f6873062048907d283d85f8d4a3", "sha256": "223d7d0c7e2a034960c5eac1e6163c90d5659c3fc6a4df88808386a275465e59" }, "downloads": -1, "filename": "ByteSplitter-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "11808f6873062048907d283d85f8d4a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2765, "upload_time": "2019-02-25T15:35:30", "url": "https://files.pythonhosted.org/packages/35/ec/8184e6549f6418cb47bd40bc9ecceb094a30d0f846dfbc92902eb1f10d6d/ByteSplitter-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c71084fe29a205f5e6a82fafece2ac03", "sha256": "0b1def6c84645869127de25f046973beb88346fa897085bc811c8db00c36733d" }, "downloads": -1, "filename": "ByteSplitter-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c71084fe29a205f5e6a82fafece2ac03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2898, "upload_time": "2019-02-25T15:35:32", "url": "https://files.pythonhosted.org/packages/0f/d1/b2d51926e3adae8589133213b5e9dc3372dbe22d002b6713d911e1df2060/ByteSplitter-1.0.0.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "f7c6bc98dd56fd9383172ce460027cca", "sha256": "ac7803f9fcff0613b86a504896904bda6f3a0273a6b7e2a2e0c70720a26ec393" }, "downloads": -1, "filename": "ByteSplitter-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f7c6bc98dd56fd9383172ce460027cca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5927, "upload_time": "2019-02-25T17:56:57", "url": "https://files.pythonhosted.org/packages/11/90/93246976a4059a71eec0d2cbac2cada855fb26d6e55521078559e78d1a74/ByteSplitter-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8fa45587194b451a2b9225b3a17e7b0", "sha256": "0c7b06e74596b801c906bb5d6800d1709d2209e6bf6ffece24d5fe44b8a52ffc" }, "downloads": -1, "filename": "ByteSplitter-1.0.4.tar.gz", "has_sig": false, "md5_digest": "b8fa45587194b451a2b9225b3a17e7b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5325, "upload_time": "2019-02-25T17:56:58", "url": "https://files.pythonhosted.org/packages/59/f3/c1ce1f5491f6e68489c0192191b945afee0e4dd4497b4952b1c7cf2f8445/ByteSplitter-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7c6bc98dd56fd9383172ce460027cca", "sha256": "ac7803f9fcff0613b86a504896904bda6f3a0273a6b7e2a2e0c70720a26ec393" }, "downloads": -1, "filename": "ByteSplitter-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f7c6bc98dd56fd9383172ce460027cca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5927, "upload_time": "2019-02-25T17:56:57", "url": "https://files.pythonhosted.org/packages/11/90/93246976a4059a71eec0d2cbac2cada855fb26d6e55521078559e78d1a74/ByteSplitter-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8fa45587194b451a2b9225b3a17e7b0", "sha256": "0c7b06e74596b801c906bb5d6800d1709d2209e6bf6ffece24d5fe44b8a52ffc" }, "downloads": -1, "filename": "ByteSplitter-1.0.4.tar.gz", "has_sig": false, "md5_digest": "b8fa45587194b451a2b9225b3a17e7b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5325, "upload_time": "2019-02-25T17:56:58", "url": "https://files.pythonhosted.org/packages/59/f3/c1ce1f5491f6e68489c0192191b945afee0e4dd4497b4952b1c7cf2f8445/ByteSplitter-1.0.4.tar.gz" } ] }