mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
Merge pull request #49 from rtreffer/compression-fix
Switch to FULL_SYNC to make prosody happy
This commit is contained in:
commit
c445b8f4ae
@ -63,18 +63,13 @@ public class ZLibOutputStream extends DeflaterOutputStream {
|
|||||||
super.flush();
|
super.flush();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int count = 0;
|
|
||||||
if (!def.needsInput()) {
|
|
||||||
do {
|
|
||||||
count = def.deflate(buf, 0, buf.length);
|
|
||||||
out.write(buf, 0, count);
|
|
||||||
} while (count > 0);
|
|
||||||
out.flush();
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
|
int count = 0;
|
||||||
do {
|
do {
|
||||||
count = (Integer) method.invoke(def, buf, 0, buf.length, 2);
|
count = (Integer) method.invoke(def, buf, 0, buf.length, 3);
|
||||||
|
if (count > 0) {
|
||||||
out.write(buf, 0, count);
|
out.write(buf, 0, count);
|
||||||
|
}
|
||||||
} while (count > 0);
|
} while (count > 0);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new IOException("Can't flush");
|
throw new IOException("Can't flush");
|
||||||
|
Loading…
Reference in New Issue
Block a user