blob: 3c83fa4d16b34f1297746f3ec67e17ca0412f178 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Phase 2 – Compression & Size Reduction
This document tracks ideas and strategies for the final optimization phase to reach the <=64k goal.
## Executable Size
### Windows
- **Replace GLFW**: For the final build, replace the statically linked GLFW library with a minimal "tiny" implementation using native Windows API (`CreateWindow`, `PeekMessage`, etc.). This is expected to yield significant savings.
- *Status*: Deferred until feature completion.
- **CRT Replacement**: Consider replacing the standard C runtime (CRT) with a minimal startup code (e.g., `tiny_crt` or similar) to avoid linking heavy standard libraries.
- **Import Minimization**: Dynamically load functions via `GetProcAddress` hash lookup to reduce the Import Address Table (IAT) size.
### General
- **Shader Compression**: Minify WGSL shaders (remove whitespace, rename variables).
- **Asset Compression**:
- Store spectrograms with logarithmic frequency bins.
- Quantize spectral values to `uint16_t` or `uint8_t`.
- Use a custom packer/compressor for the asset blob.
|