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;
  • Unexpected issues can occur if folders or files names contains \ or /.

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-2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

imageZIP-2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for imageZIP-2.tar.gz
Algorithm Hash digest
SHA256 b3a5b9d6aedc3132a12d6fda9e20d470143ed2171b36a30df2392d3a72dd2a26
MD5 146075f7ee68a8df5280d8d319168960
BLAKE2b-256 b3e2385283090bd966aceb1d92abda7ee4f49503044e0dcc6cc4ebaca97ee638

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for imageZIP-2-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9ce2654c5c01af6cf074159deac663171d6bb3097239be2135b6d3a96a7f4a
MD5 fb13a67deefa5570862217338b9a9e9d
BLAKE2b-256 8d4e2ec661c33352f4e748a4e1b3a7d38eca8bf7963fe11cc6845eee3e14dc89

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