(byte[] src)
| 246 | } |
| 247 | |
| 248 | public static byte[] ungzip(byte[] src) throws Exception { |
| 249 | ByteArrayOutputStream out = new ByteArrayOutputStream(); |
| 250 | GZIPInputStream gzis = new GZIPInputStream(new ByteArrayInputStream(src)); |
| 251 | byte[] buf = new byte[1024]; |
| 252 | while (true) { |
| 253 | |
| 254 | int len = gzis.read(buf); |
| 255 | if (len < 0) |
| 256 | break; |
| 257 | |
| 258 | out.write(buf, 0, len); |
| 259 | } |
| 260 | return out.toByteArray(); |
| 261 | } |
| 262 | |
| 263 | public static byte[] replaceArray(byte[] src, Range area, byte[] replacer) { |
| 264 | return replaceArray(src, area.getPositionStart(), area.getPositionEnd(), replacer); |
nothing calls this directly
no test coverage detected