Skip to main content

Piclang

Piclang is a Python utility that stores a file or folder inside a single PNG image. It encodes the original data into pixel RGB values, compresses it with zlib, and writes the result as a valid PNG file that can later be decoded back to its original contents.

This makes it useful for:

  • hiding files in plain sight
  • bundling folders into a single image payload
  • experimenting with custom steganographic-style data storage
  • converting a file or directory into a portable, easy-to-share image

Features

  • Encode a single file or an entire folder into a PNG
  • Decode the PNG back into the original file or folder structure
  • Keep folder contents recursively intact
  • Optional custom image width for more control over the output image size
  • CLI and Python API support

Installation

From a local checkout of this repository:

git clone https://github.com/rakibulofficial1017/piclang.git
cd piclang
python -m pip install .

If the package is available from PyPI in your environment, you can also install it with:

python -m pip install piclang

Command-line usage

Encode a file:

piclang encode lorem.txt -o lorem.png

Encode a folder:

piclang encode my-folder -o my-folder.png

Use a custom image width:

piclang encode report.pdf -o report.png -w 1200

Decode an image back to its original content:

piclang decode lorem.png -o restored.txt

Decode a folder archive:

piclang decode my-folder.png -o extracted_folder

Python API

You can also use the library directly from Python:

from piclang import encode_path, decode_path

encode_path("lorem.txt", "lorem.png")
decode_path("lorem.png", "restored.txt")

Or with a custom width:

from piclang import encode_path

encode_path("my-folder", "my-folder.png", width=2000)

How it works

Piclang does the following:

  1. Reads the input file or recursively serializes a folder into a JSON payload.
  2. Compresses the payload with zlib.
  3. Packs the compressed payload with a small header that stores metadata.
  4. Stores the binary data in the RGB channels of a PNG image.
  5. Decodes by reading the PNG pixels, validating the header, decompressing the payload, and restoring the original file or folder.

Notes

  • The project is intended as a lightweight experimental encoder/decoder rather than a production-grade archival format.
  • Output image dimensions are chosen automatically unless you provide --width.
  • Symbolic links are skipped during folder encoding for safety.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Created by Mohammad Rakibul Islam. Source code: rakibulofficial1017/ChemQL.

Metadata

Release files for piclang 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piclang 0.1.1
File Size Uploaded Provenance Actions
piclang-0.1.1.tar.gz 5.6 kB Without provenance Details for piclang-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for piclang 0.1.1
File Interpreter ABI Platform Actions
piclang-0.1.1-py3-none-any.whl Python 3 none any Details for piclang-0.1.1-py3-none-any.whl

Total release size: 11.7 kB

Release files / piclang-0.1.1.tar.gz

Download URL piclang-0.1.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e651ec4b44a1a44f3d20fd0027eec5e147681497ac71736731199e7e685692f4
BLAKE2b-256 checksum
How to use checksums
2b6a1d24935c5f07bb98d89fa78c9fb16c8f89c78992b383b61af898496ad506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / piclang-0.1.1-py3-none-any.whl

Download URL piclang-0.1.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd8c5054ac3bf6e325b0568fd0c9278b251e935988c7b6cc09decc495b36f11f
BLAKE2b-256 checksum
How to use checksums
711d387e784c8036b2934b8c977217be1f538d84e2ccdbffe3bea8c8de5096b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for piclang 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page