Issue with WCS GetCoverage requests with compression Deflate

I have noticed incomplete/corrupted tiff files from WCS GetCoverage requests with compression Deflate after updating GeoServer to newer version.
Older version:

After update:

Requests at version 2.24.1. and under work fine

Requests at versions 2.25.1. and 2.26.0. return corrupted files


If I remove compression or put it to something like LZW it produces working tiff file but since we are using WCS to fetch geoTiffs for reupload to another GeoServer instance and they can get quite big we need to compress them.
LZW is maybe, but for some reason reuploaded geoTiffs have much slower WMS requests.

Is there something I can do, maybe adding some parameters to GetCoverage requests or to geoTiff PUT requests?
Could this be GeoServer issue?

Checking the 2.24.1 release - does not show anything changing about GeoTIFF.

The release says it is made with “GeoTools 30.2, and GeoWebCache 1.24.2.”… and GeoTools is responsible for doing the GIS work (while GeoServer does the server work).

The GeoTools 30.2 Released blog post indicates something!

GEOT-7503 GeoTiffIIOMetadataDecoder doesn’t support inf/-inf

We should ask if anyone else if having trouble; not sure the above issue has anything to do with your failure.

Hi,
we use deflated images on a daily basis without issues… what’s the specific structure of them, can you share a gdalinfo over a file?

Also, there has been updates to imageio-ext in the last few days, wondering if any of those could help: I’d suggest trying out a nightly build of the 2.26.x series (2.25.x did not receive the update, so probably not worth trying).

Cheers
Andrea

Thanks for answers, I tried Index of /geoserver/2.26.x/ → geoserver-2.26.x-2025-03-20-bin.zip and its working, GetCoverage with compression deflate gives same results as version 2.24.1


Here is gdalinfo from problematic geoTiff:

Driver: GTiff/GeoTIFF
Files: D:\25-1-116-8 Biograd nm.tif
Size is 7500, 5000
Coordinate System is:
PROJCRS["HTRS96 / Croatia TM",
    BASEGEOGCRS["HTRS96",
        DATUM["Croatian Terrestrial Reference System",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4761]],
    CONVERSION["Croatia Transverse Mercator",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",16.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9999,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Cadastre, engineering survey, topographic mapping (large scale)."],
        AREA["Croatia - onshore."],
        BBOX[42.34,13.43,46.54,19.43]],
    ID["EPSG",3765]]
Data axis to CRS axis mapping: 1,2
Origin = (409999.999999999068677,4870000.000000000000000)
Pixel Size = (2.000000000000000,-2.000000000000000)
Metadata:
  TIFFTAG_DATETIME=2020:06:29 09:03:29
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  410000.000, 4870000.000) ( 15d22'42.43"E, 43d57'52.12"N)
Lower Left  (  410000.000, 4860000.000) ( 15d22'48.51"E, 43d52'28.15"N)
Upper Right (  425000.000, 4870000.000) ( 15d33'55.26"E, 43d57'58.17"N)
Lower Right (  425000.000, 4860000.000) ( 15d34' 0.33"E, 43d52'34.18"N)
Center      (  417500.000, 4865000.000) ( 15d28'21.62"E, 43d55'13.30"N)
Band 1 Block=7500x256 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 255,215,200,255
    1: 0,0,0,255
    2: 195,195,195,255
    3: 150,150,150,255
    4: 0,164,232,255
    5: 219,237,251,255
    6: 138,104,67,255
    7: 190,136,98,255
    8: 32,151,64,255
    9: 220,230,174,255
   10: 200,221,183,255
   11: 160,198,149,255
   12: 255,252,228,255
   13: 255,242,129,255
   14: 225,166,105,255
   15: 203,82,92,255
   16: 255,255,255,255
   17: 0,0,0,255