| 565 | } |
| 566 | |
| 567 | private static byte[] getHttpBody(byte[] input_data) throws Exception { |
| 568 | byte[][] search_words = {new String("\r\n\r\n").getBytes(), new String("\n\n").getBytes(), |
| 569 | new String("\r\r").getBytes()}; |
| 570 | for (byte[] search_word : search_words) { |
| 571 | |
| 572 | int idx; |
| 573 | if ((idx = Utils.indexOf(input_data, 0, input_data.length, search_word)) < 0) { |
| 574 | |
| 575 | continue; |
| 576 | } |
| 577 | return ArrayUtils.subarray(input_data, idx + search_word.length, input_data.length); |
| 578 | } |
| 579 | return new byte[]{}; |
| 580 | } |
| 581 | |
| 582 | private static byte[] zstd_decompress(byte[] input_data) throws Exception { |
| 583 | ByteArrayInputStream in = new ByteArrayInputStream(input_data); |