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/piclang.

Metadata

Release files for piclang 0.1.2

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.2
File Size Uploaded Provenance Actions
piclang-0.1.2.tar.gz 5.6 kB Without provenance Details for piclang-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 11.7 kB

Release files / piclang-0.1.2.tar.gz

Download URL piclang-0.1.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
474452f4d2c5b59752930047a5564ec917e7f71a55feae9522add52b52d9ac8e
BLAKE2b-256 checksum
How to use checksums
4f7b152d7814e41bf168d947e0f4f822c2c7fd58ea78b4cf7fe2729c773722fe
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.2-py3-none-any.whl

Download URL piclang-0.1.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31b47c1e9ee19055ce4ca1a2f7683451d2a97719d70d6409b4e5d7b37a737aad
BLAKE2b-256 checksum
How to use checksums
2595c5b02026c3fb896ddea825fc716104849aee242a2fe2e0b8e860de42f756
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.2

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