A robust Python implementation of a 10-layer encoding and decoding system.
.
├── src/ # Source code
│ ├── core/ # Core functionality
│ │ └── encoder_decoder.py # Main encoding/decoding implementation
│ └── utils/ # Utility functions
│ └── compare_complexity.py
├── tests/ # Test files
├── docs/ # Documentation
├── examples/ # Example code and debug utilities
└── archive/ # Legacy code (kept for reference)
-
Implements a 10-layer encoding/decoding system:
- Base64 encoding
- Simple character substitution
- ROT13 on alphabetic characters
- String reversal
- Position-based character shifts
- Pattern interleaving with "X1Y2Z3"
- Chunk-based transformations
- Triple Base64 encoding
- Marker insertion at fixed intervals
- Final Base64 encoding
-
Robust implementation with proper error handling
-
Handles Base64 padding correctly
-
Support for problematic edge cases
from src.core.encoder_decoder import encode, decode
# Encoding
original = "test123"
encoded = encode(original)
print(f"Encoded: {encoded}")
# Decoding
decoded = decode(encoded)
print(f"Decoded: {decoded}")To run the tests:
cd tests
python -m unittest discover- Python 3.6+
- Base64 module (standard library)