Skip to content

Commit

Permalink
Self-notes for FeatureWriterFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
magicDGS committed Mar 21, 2018
1 parent 7d5790c commit 0dd1d48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/htsjdk/tribble/writer/FeatureWriterFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public final class FeatureWriterFactory {
// creates an MD5 for the output
private boolean createMd5 = Defaults.CREATE_MD5;
// if true, use BlockCompressedOutputStream; otherwise use CustomGzipOutputStream
// TODO - this should have a new Defaults (I believe)
private boolean useBlockCompression = false;

/**
Expand Down Expand Up @@ -176,6 +177,7 @@ public <F extends Feature> FeatureWriter<F> makeWriter(final String outputFileNa
final boolean blockCompressed = AbstractFeatureReader.hasBlockCompressedExtension(outputFileName);
if (blockCompressed) {
outputStream = (useBlockCompression)
// TODO - BGZIP should allow to set the location from a Path or String
? BlockCompressedOutputStream.maybeBgzfWrapOutputStream(null, outputStream)
: new CustomGzipOutputStream(outputStream, Defaults.COMPRESSION_LEVEL);
}
Expand Down

0 comments on commit 0dd1d48

Please sign in to comment.