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.

Metadata

Release files for piclang 0.1.0

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

Built distribution (wheel)

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

Total release size: 11.6 kB

Release files / piclang-0.1.0.tar.gz

Download URL piclang-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5701317f0b6959631f21518d4b8e840dc41bd422a8f0686688d365ce22a67e31
BLAKE2b-256 checksum
How to use checksums
7539e329aa8e6a6c9204b17bcecc38519865a2d6d4c2d32af2b63650f2669bed
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.0-py3-none-any.whl

Download URL piclang-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7165be86ec481ca93f31a2ab9040ee35ee59355fdeddfee5c4cd16c8165de2e9
BLAKE2b-256 checksum
How to use checksums
1b841ebce05af91ae0e847daebbac0683db922feb661542656db05dbfda0de05
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.0

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