|
@@ -28,7 +28,7 @@ namespace Ppub {
|
|
asset.stream = stream;
|
|
asset.stream = stream;
|
|
|
|
|
|
// Exclude any gzip flags, as we will add that later if we are compressing the content
|
|
// Exclude any gzip flags, as we will add that later if we are compressing the content
|
|
- asset.flags = flags.where(f => f != "gzip").to_collection();
|
|
|
|
|
|
+ asset.flags = flags.where(f => f != "gzip").to_vector();
|
|
|
|
|
|
if(compression.compress) {
|
|
if(compression.compress) {
|
|
asset.flags.add("gzip");
|
|
asset.flags.add("gzip");
|
|
@@ -52,7 +52,7 @@ namespace Ppub {
|
|
stream.write(index_data);
|
|
stream.write(index_data);
|
|
|
|
|
|
foreach (var asset in assets) {
|
|
foreach (var asset in assets) {
|
|
- if(asset.flags.contains("gzip")) {
|
|
|
|
|
|
+ if(asset.flags.any(f => f == "gzip")) {
|
|
var compressor = new ZlibCompressor(ZlibCompressorFormat.GZIP, 9);
|
|
var compressor = new ZlibCompressor(ZlibCompressorFormat.GZIP, 9);
|
|
var conv_stream = new ConverterInputStream(asset.stream, compressor);
|
|
var conv_stream = new ConverterInputStream(asset.stream, compressor);
|
|
stream.splice(conv_stream, OutputStreamSpliceFlags.CLOSE_SOURCE);
|
|
stream.splice(conv_stream, OutputStreamSpliceFlags.CLOSE_SOURCE);
|