Skip to main content

Archive (encrypt) files and directories to image file

Project description

imageZIP

This is a small python package to archive (encrypt) files and directories into a single image file.

This project is made just for fun, it has no practical use, output "ZIP" image will always have the same or greater file size than it's content. Also, this is not easy-to-scan like QR codes.

Algorithm is pretty easy. If folder to zip is chosen, it will iterate through all folders and files inside it. If folder is found, it will write relative path of folder in bytes and add special folder delimiter at the end. If file is found, it will write it's relative path and name in bytes, add special file delimiter and then write all it's content in bytes with additional second file delimiter. When bytes array is ready to go, it will build an image, where individual pixels representing particular byte number.

Example

demo image

This is an "imageZIP archive", containing this whole "imageZIP" repository.

It was created with imageZIP.zip("imageZIP", scale=4).

You can actually download this image and unzip it with imageZIP.unzip("demo_zip.png", scale=4), it will create "imageZIP" folder with all repository files.

How to use

To download this package, you can use pip install imageZIP.

Then go to python terminal and write import imageZIP.

Then you can use 2 available functions:

  • imageZIP.zip(path: str, scale: int = 1, color_mode: str = 'heat_map');
  • imageZIP.unzip(path: str, scale: int = 1, color_mode: str = 'heat_map').

Only path attribute is necessary here, other settings can be omitted.

Notes:

  • For zip and unzip you have to provide same scale and color_mode settings;
  • scale is have to be int > 0;
  • Available color_modes are: bw, heat_map, heat_map_toxic;
  • For now, absolute paths for linux and mac are not tested, but it should work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imageZIP-1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imageZIP-1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file imageZIP-1.tar.gz.

File metadata

  • Download URL: imageZIP-1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for imageZIP-1.tar.gz
Algorithm Hash digest
SHA256 4e0f0727c36c63846d57fb6695faf9026fe6a1ae293388d0bc29f92f4c12db8f
MD5 e7adc0af2d3f88efd408aab94819222b
BLAKE2b-256 fc3d9e112d5ef8173f2e8e8540ded24aa0ace725409ba2531683f658144175b1

See more details on using hashes here.

File details

Details for the file imageZIP-1-py3-none-any.whl.

File metadata

  • Download URL: imageZIP-1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for imageZIP-1-py3-none-any.whl
Algorithm Hash digest
SHA256 1218042479be7b2a9b1efecabd61402e88875fe9078bf5a98bca852dcfc8cbf3
MD5 86d983f5b83447f5298a3d51de4f0327
BLAKE2b-256 9c020b93e9eb16ad4fb3ae1613f933d88271cb205a5e2fb16e4cddf9189a3ef6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page