# F8 Tools Encryption Compression Zip Workflow

> Use when working with Encryption/Compression/Zip tools — AES encryption, data compression, and ZIP archive management in F8Framework.

- Skill: `tomevault-io/f8-tools-encryption-compression-zip-workflow` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/f8-tools-encryption-compression-zip-workflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/f8-tools-encryption-compression-zip-workflow/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/f8-tools-encryption-compression-zip-workflow

---


# Encryption/Compression/Zip Tools Workflow



## Use this skill when

- The task involves data encryption (AES), compression, or ZIP operations.
- The user needs to protect data, compress assets, or handle ZIP archives.

## Path resolution

1. Source files:
   - Assets/F8Framework/Runtime/Utility/Encryption.cs (~21KB)
   - Assets/F8Framework/Runtime/Utility/Compression.cs (~6KB)
   - Assets/F8Framework/Runtime/Utility/ZipHelper.cs (~12KB)

## Sources of truth

- Source files: Encryption.cs, Compression.cs, ZipHelper.cs in Runtime/Utility
- Third-party: ICSharpCode.SharpZipLib (built-in)

## Key capabilities

### Encryption (Encryption.cs)
- `OptimizedAES` — AES-256 encryption/decryption
- Key and IV management
- Random IV generation (null IV = random)
- Used by StorageManager for local data encryption
- Used by AssetManager for AB encryption

```csharp
// Example: Create encryptor
var aes = new Util.OptimizedAES(key: "AES_Key", iv: null);
byte[] encrypted = aes.Encrypt(plainBytes);
byte[] decrypted = aes.Decrypt(encrypted);
```

### Compression (Compression.cs)
- Data compression/decompression
- GZip format support
- Used for reducing data transmission size

### Zip (ZipHelper.cs)
- ZIP archive creation and extraction
- File-level ZIP operations
- Used by SyncStreamingAssetsLoader for Android StreamingAssets access
- Based on ICSharpCode.SharpZipLib

## Workflow

1. For encryption: create `OptimizedAES` instance with key.
2. For compression: use Compression class static methods.
3. For ZIP: use ZipHelper for archive operations.
4. Storage module uses encryption automatically when configured.
5. No module initialization needed — pure utility classes.

## Common error handling

| Error | Cause | Solution |
|-------|-------|----------|
| Decryption fails | Key mismatch | Ensure same key across encrypt/decrypt |
| ZIP extraction fails | Corrupt archive | Verify ZIP integrity before extraction |
| Compression ratio poor | Already compressed data | Check if data is already compressed |

## Output checklist

- Encryption/compression/ZIP method selected.
- Keys and parameters configured.
- Error handling for crypto/IO failures.

---
> Source: [TippingGame/F8Framework](https://github.com/TippingGame/F8Framework) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-29 -->

