@Override
    public void writeTo(final OutputStream outStream) throws IOException {
        Args.notNull(outStream, "Output stream");
        try (InputStream inStream = getContent()) {
            final byte[] buffer = new byte[BUFFER_SIZE];
            int l;
            while ((l = inStream.read(buffer)) != -1) {
                outStream.write(buffer, 0, l);
            }
        }
    }
Constructs a new {@link DecompressingEntity}.

@param wrapped the non-null {@link HttpEntity} to be wrapped
@param inputStreamFactory factory to create decompressing stream.
httpclient5/src/main/java/org/apache/hc/client5/http/entity/DecompressingEntity.java