G3ZSTD - Zstandard Compression Test

This page demonstrates the G3ZSTD native object using Zstandard (zstd) compression with configurable levels.

Test 1: Basic Text Compression with Different Levels

Original Text:

The quick brown fox jumps over the lazy dog. Zstandard is a real-time compression algorithm providing high compression ratios. It offers a trade-off between compression ratio and speed.

Original Size: 185 bytes

LevelCompressed SizeRatioStatus
3138 bytes74,59%✓
11139 bytes75,14%✓
22139 bytes75,14%✓

Test 2: Decompression Roundtrip

Original:

This is a test string for zstd compression. It contains repeated patterns: test test test and string string string and compression compression compression.

Compressed Size: 94 bytes

Decompressed:

This is a test string for zstd compression. It contains repeated patterns: test test test and string string string and compression compression compression.

✓ Roundtrip successful!

Test 3: Byte Array Compression

Original Array Size: 200 bytes

Compressed Size (Level 15): 213 bytes

Decompressed Size: 200 bytes

✓ Byte array roundtrip successful!

Test 4: Batch Compression of Multiple Items

Batch compressing 5 items at level 12:

Compressed Items: 5

Decompressed Items:

  1. Item 1: First batch item for compression
  2. Item 2: Second batch item with data
  3. Item 3: Third item in the compression batch
  4. Item 4: Fourth and final batch item
  5. Item 5: Extra item to complete the set

Test 5: File Compression

Original File Size: 52 bytes

Compressed File Size: 23 bytes

Compression Ratio: 44,23%

✓ File compression successful!

Compression Level Guide

G3ZSTD supports compression levels from -5 to 22:

Range Description Use Case
-5 to 1 Very Fast Real-time applications, streaming
2 to 8 Fast General purpose compression
9 to 15 Balanced (default 11) Good balance of speed and ratio
16 to 22 Maximum Compression Archive, long-term storage

AxonASP Server - G3ZSTD Zstandard Compression Test © 2026