❯ ./build/release/bin/xtm analyze data/canyons/grand_canyon.tif --scale 0.01
Loading dataset: data/canyons/grand_canyon.tif...
Analyzing terrain (scale=0.01)...

================================================================
  Dataset Overview
================================================================
Dimensions:       3600 x 3600 (12.96M pixels)
Elevation Range:  [528.00, 2811.20]
Elevation Mean:   1764.98
Elevation StdDev: 419.12
Unique Values:    7425697
Shannon Entropy:  22.6116 bits/pixel
Meter Entropy:    10.6155 bpp
Decimeter Entropy:3.3219 bpp
Centimeter Entropy:3.3219 bpp

================================================================
  Compression Summary
================================================================
Overall Bits/Pixel:        10.5183 bpp
Estimated Compression Ratio: 3.04x

================================================================
  Block Feature Profile
================================================================
Avg Block Variance:   359201647.69
Avg Laplacian Energy: 403.30
Avg Horiz Correlation:0.01
Avg Vert Correlation: 0.00

================================================================
  Primary Predictor Performance
================================================================
+------+-----------------+----------+----------+---------+---------+
| Rank | Predictor       | Base Sbl | Base Lcl | Usage % | Avg Mag |
+------+-----------------+----------+----------+---------+---------+
| 1    | Gradient        | 3.0913   | 3.0913   | 85.23 % | 1.89    |
| 2    | GAP (CALIC)     | 3.5755   | 3.6102   | 7.95  % | 1.07    |
| 3    | Least Squares   | 3.7619   | 3.8943   | 4.55  % | 1.84    |
| 4    | Left            | 4.2720   | 4.2720   | 2.27  % | 0.42    |
| 5    | JPEG-LS         | 3.4161   | 3.4161   | 0.00  % | 0.00    |
| 6    | Polynomial      | 8.5640   | 6.4737   | 0.00  % | 0.00    |
+------+-----------------+----------+----------+---------+---------+
  (Base Sbl = 512x512 entropy, Base Lcl = 64x64 entropy)

================================================================
  Residual Optimization (Second-Order RDO)
================================================================
Avg Pre-Residual Zeros: 0.34%
Avg Pre-Residual Var:   4.69
Avg Post-Residual Zeros:30.84%
Avg Post-Residual Var:  844.82

Winning Second-Order Predictors:
  1. Average      3.9  % (3 blocks)
  2. Spatial      2.6  % (2 blocks)
  3. Least Squares93.5 % (72 blocks)
  4. Median       0.0  % (0 blocks)

Residual Bits Savings:  2.40%

================================================================
  Primary Residual Distribution
================================================================
Mean Absolute:      1.58
Variance:           21.13
Zero Values (%):    31.60%
Max Absolute:       2729

|r|=0       32.64  %  ████████████████
|r|=1       37.23  %  ██████████████████
|r|∈[2,5]   26.44  %  █████████████
|r|∈[6,10]  3.20   %  █
|r|∈[11,50] 0.49   %
|r|∈[51,100]0.00   %
|r|>100     0.00   %

================================================================
  Quadtree Analysis
================================================================
Total Leaves:       88
512x512 Blocks:     49
256x256 Blocks:     27
128x128 Blocks:     4
64x64 Blocks:       8

Quadtree Overhead:  0.000007 bpp (96 total bits)

================================================================
  Information Reduction Pipeline
================================================================
Stage                    Entropy(bpp)   Δ(bpp)        Remaining%
----------------------------------------------------------------------
1. Raw Elevation         22.6116        —            —
2. Quadtree + RDO (1st)  3.0623         -19.5493     13.54  %
3. Second-Order RDO      2.9888         -0.0735      13.22  %
4. Precision Coding      10.5183        +7.5295       46.52  %

================================================================
  Entropy Coding & Context Modeling
================================================================
Avg Unique Contexts/Block: 4
Avg Symbols per Context:   68338.39
Context Size Range:        [640035, 12316264] (median: 8989802)

================================================================
  Compute Analysis
================================================================
GDAL Load Time:      538.05 ms
Analysis Time:       13261.88 ms
Total Time:          13799.92 ms
================================================================