Fix errors when using LZ4 compression

This commit is contained in:
James Seibel
2025-01-14 07:17:40 -06:00
parent f3368f5a07
commit 0a9913e24d
@@ -97,6 +97,19 @@ public class DhDataInputStream extends DataInputStream
// of returning -1 as defined by DataInputStream.read()
return -1;
}
catch (IOException e)
{
// LZ4 has the same bug as XZ (listed above)
// just with a slightly different exception and error message
if (e.getMessage().equals("Stream ended prematurely"))
{
return -1;
}
else
{
throw e;
}
}
}
@Override