.NET 10/11 · TypeScript/JavaScript · C · x86/x64 assembly
A new image format
for smaller, faster files.
Tedd.FIC is a lossless image format with .NET 10 and 11, TypeScript/JavaScript, C, and x86/x64 assembly implementations. Across 5,000 selected images, the .NET FIC Fast encoder produced 24.6% fewer bytes than SkiaSharp PNG and used 53× less summed encode time under the measured eight-worker workload. Optional Deflate, GZip, Zstandard, and Brotli compression can reduce FIC files further.
Performance varies with image content and hardware. See the image corpus benchmarks ↓
FIC Fast compared with SkiaSharp PNG on 11.88 gigapixels
24.6% fewer bytes
53× less time
Eight concurrent images · source decoding excluded
REAL IMAGE CORPUS
Size and speed across 5,000 images
We randomly selected 1,000 images from each of five folders, then ran every codec on the same original-resolution pixels. The size chart compares lossless output; the speed charts also show JPEG at quality 90. Select a folder to inspect its results.
Encoded size
Aggregate output size · lower is better
Encode speed
Megapixels per second · higher is better · JPEG q90 is lossy
Decode speed
Megapixels per second · higher is better · JPEG q90 is lossy
Seed 20260926; 1,000 images per folder. AMD Ryzen 9 5950X, Windows, .NET 11 preview, eight independent image workers. These historical FIC measurements used uncompressed outer payloads. Times are summed per-image codec times, not wall-clock duration. Original JPEG files were decoded outside the timings; source metadata was omitted from all output formats. PNG and FIC were verified pixel for pixel. JPEG q90 is lossy; its speed is shown for context, while the size graph compares lossless formats only. Full benchmark table and method →
OUTER COMPRESSION
Choose size or speed
Measured through the caller-buffer FIC APIs on 58 lossless images: six large photos, 32 COCO images, and 20 graphics. Each codec used the same pixels and FIC effort; every file was decoded and checked byte for byte.
| FIC effort | Outer codec | Output MB | Saved | Encode ms | Decode ms |
|---|---|---|---|---|---|
| Fast | None | 59.821 | — | 255 | 146 |
| Fast | Deflate | 54.258 | 9.30% | 2,012 | 300 |
| Fast | GZip | 54.259 | 9.30% | 2,013 | 306 |
| Fast | Zstandard q1 | 54.755 | 8.47% | 324 | 196 |
| Fast | Brotli q5 | 53.857 | 9.97% | 2,186 | 462 |
| Default | None | 45.638 | — | 331 | 230 |
| Default | Deflate | 43.981 | 3.63% | 1,666 | 355 |
| Default | GZip | 43.982 | 3.63% | 1,670 | 359 |
| Default | Zstandard q2 | 44.493 | 2.51% | 388 | 248 |
| Default | Brotli q5 | 43.712 | 4.22% | 996 | 449 |
| Max | None | 45.635 | — | 339 | 224 |
| Max | Deflate | 43.978 | 3.63% | 1,692 | 355 |
| Max | GZip | 43.979 | 3.63% | 1,691 | 359 |
| Max | Zstandard q2 | 44.492 | 2.50% | 411 | 248 |
| Max | Brotli q5 | 43.709 | 4.22% | 1,028 | 449 |
On the six large photos with Fast FICQ, explicit Zstandard q3 was the fastest tested setting to exceed 10% savings: 10.34% in 469 ms summed encode time. Zstandard q1 saved 9.67% in 237 ms; Deflate q6 saved 10.78% in 1,482 ms; Brotli q5 saved 11.60% in 1,961 ms. Fast defaults to no outer compression. One warmup and three timed repetitions per image; times sum per-image medians and exclude source decoding, file I/O, and destination allocation. AMD Ryzen 9 5950X, Windows, .NET 11 RC1. Method and full table →
SYNTHETIC REFERENCE
Controlled examples
Lossless codecs were checked for exact pixel round trips. JPEG is shown for speed context; it is lossy at quality 90, so its file size is not an equivalent-quality comparison.
| Image | Codec | Bytes | Encode | Decode |
|---|---|---|---|---|
| Gradient | FIC Fast | 292,045 | 1.92 ms | 0.68 ms |
| Gradient | FIC Default | 235,802 | 1.15 ms | 1.05 ms |
| Gradient | ImageSharp PNG | 391,293 | 112.32 ms | 5.76 ms |
| Gradient | SkiaSharp PNG | 353,053 | 88.31 ms | 6.40 ms |
| Graphics | FIC Fast | 1,977 | 1.42 ms | 0.08 ms |
| Graphics | FIC Default | 1,633 | 2.74 ms | 0.08 ms |
| Graphics | ImageSharp PNG | 2,368 | 7.55 ms | 1.26 ms |
| Graphics | SkiaSharp PNG | 2,426 | 15.74 ms | 2.57 ms |
| Noise | FIC Fast | 835,271 | 1.90 ms | 0.66 ms |
| Noise | FIC Default | 934,915 | 7.54 ms | 2.30 ms |
| Noise | ImageSharp PNG | 900,102 | 64.60 ms | 5.59 ms |
| Noise | SkiaSharp PNG | 918,060 | 50.23 ms | 8.07 ms |
Synthetic 512×512 RGBA images on AMD Ryzen 9 5950X, Windows 10.0.26200, .NET 11 RC1. FIC used no outer compression. Each cell is the median of three launches, each with 100 warmups and seven timed repetitions per operation. ImageSharp 3.1.12 and SkiaSharp 4.151.2. Full results, including JPEG, and reproduction steps →
GET STARTED
Use FIC from .NET, TypeScript/JavaScript, C, or assembly
Supply interleaved RGB or RGBA bytes in row-major order. The decoder restores the original bytes and dimensions.
dotnet add package Tedd.FICusing Tedd.FIC;
byte[] file = Fic.Encode(rgb, width, height, 3,
effort: FicEffort.Fast, compression: FicCompression.Auto);
byte[] pixels = Fic.Decode(file,
out int w, out int h, out int channels);import { encode, decode, decodeAsync } from './fic.js';
// rgba is a Uint8Array, four bytes per pixel.
const file = encode(rgba, width, height, 4, new Uint8Array(), 'Zstd');
const { pixels, width: w, height: h, channels } = decode(file);
// Load a .fic file from a URL:
const response = await fetch('image.fic');
const loaded = await decodeAsync(new Uint8Array(await response.arrayBuffer()));The package targets .NET 11 RC1 or later. Auto uses no outer compression for Fast, Zstandard quality 2 for Default, and Brotli quality 5 for Max. Explicit Zstandard at Fast effort uses quality 1. Deflate, GZip, Zstandard, and Brotli are available at every effort. The JavaScript module encodes and decodes all four outer compression types without browser compression APIs. Its encoder writes Fast-tier literal strips and stores an uncompressed payload when the requested outer codec does not reduce its size. The TypeScript source builds the JavaScript module and type declarations.
Native source
C codec — a CMake build with a C API for encoding and decoding. Its encoder writes uncompressed version 00 files; compressed decoding uses a caller-supplied decompression callback.
32-bit x86 assembly and 64-bit x64 assembly — Windows assembly listings with a shared C interface and build script. Their encoders write uncompressed Fast-tier files; decoding compressed files requires a caller-supplied callback.
TRY IT IN YOUR BROWSER
Convert an image
Upload JPEG, PNG, WebP, or FIC. Standard images are decoded in the browser and stored as FIC; FIC can be downloaded as PNG, WebP, or JPEG. Processing stays in this browser tab.
FILE FORMAT
A container with room for metadata
Version 02 records one compression byte, EXIF length, and expanded payload length. Compression byte values are 0 = none, 1 = Deflate, 2 = GZip, 3 = Zstandard, and 4 = Brotli. Raw EXIF TIFF bytes come before the image payload; the pixel stream includes a CRC-32C checksum. Versions 00 and 01 remain readable.
EXIF is preserved as bytes; the library does not interpret its tags. Read the container specification →