I have a mini server
byte[] content = fileManager.get(request.getUri());
Here I get the contents of the files on the server
Next I produce compression and chunking
content = process(content, response);
private byte[] process(byte[] content, Response response) {
ProcessorList processors = new ProcessorList();
processors.add(new CompressDelegator(new GZIPCompressor()));
processors.add(new ChunkDelegator(new Chunker(30)));
content = processors.process(content, response);
return content;
}
After that, something amazing happens Now in the compressed and chunked content of the file
System.out.println(Arrays.toString(content));
System.out.println(Arrays.toString(new String(content).getBytes()));
Two of these will print different answers. Why?