Metadata-Version: 2.4
Name: gpack
Version: 0.0.4
Summary: GPack is struct analog and better!
Author-email: GPGStudio <gpgstudio.original@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/GPGSTUDIO/GPack
Project-URL: Repository, https://github.com/GPGSTUDIO/GPack
Project-URL: Bug Reports, https://github.com/GPGSTUDIO/GPack/issues
Keywords: GPack,analog,better,binary,hex,converter
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Dynamic: license-file

# **An analogue of Struct for python and even better!**!

Installing:
```python
pip install gpack
```

Example usage:

```python
import gpack 
"1234".pack("bi",2)
```

GPack replaces the python compiler for improved and convenient operation.

> b - Big-Endian
> 
> l - Little-Endian
> 
> i - Int
> 
> I - Signed Int
> 
> s - String
> 
> o - Bool
> 
> n - Bytes

More usage:

```python
test_data = [123, -123, "aboba", b"aboba", 1234, True, False, 321]
import gpack
packed = test_data.pack("bilIsniooi", 1, 1, 5, 10, 5, 1, 1, 2)

unpacked = packed.unpack("bi lI s n i o o i", 1, 1, 5, 10, 5, 1, 1, 2)
print(unpacked)

[123, -123, 'aboba', b'aboba\x00\x00\x00\x00\x00', 1234, True, False, 321]
```

**You can use the spaces for ease of use**

**Format Specifiers with sizes**

Numbers after formats specify sizes in bytes:

```python
# Pack string (5 bytes) + int (4 bytes) + bool (1 byte)
packed = ["hello", 123, True].pack("s i o", 5, 4, 1)

# Unpack with same sizes
unpacked = packed.unpack("s i o", 5, 4, 1)
```
