- Timestamp:
- 2023-03-21T14:21:54+01:00 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/pbf/Blob.java
r18697 r18698 11 11 12 12 import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream; 13 import org.apache.commons.compress.compressors.lzma.LZMACompressorInputStream;14 import org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream;15 13 16 14 /** … … 19 17 */ 20 18 public final class Blob { 19 /** The compression types for the blob */ 21 20 public enum CompressionType { 22 21 /** No compression */ … … 37 36 private final CompressionType compressionType; 38 37 private final byte[] bytes; 38 39 /** 40 * Create a new blob 41 * @param rawSize The blob size 42 * @param compressionType The compression type 43 * @param bytes The bytes of the blob 44 */ 39 45 public Blob(@Nullable Integer rawSize, @Nonnull CompressionType compressionType, @Nonnull byte... bytes) { 40 46 this.rawSize = rawSize; … … 75 81 * @throws IOException if we don't support the compression type <i>or</i> the decompressor has issues, see 76 82 * <ul> 77 * <li>{@link LZMACompressorInputStream}</li>78 * <li>{@link ZstdCompressorInputStream}</li>79 83 * <li>{@link BZip2CompressorInputStream}</li> 80 84 * </ul> … … 86 90 case raw: 87 91 return bais; 88 case lzma:89 return new LZMACompressorInputStream(bais);90 case zstd:91 return new ZstdCompressorInputStream(bais);92 92 case bzip2: 93 93 return new BZip2CompressorInputStream(bais); 94 case lzma: 95 case zstd: 94 96 case lz4: 95 throw new IOException( "lz4pbf is not currently supported");97 throw new IOException(this.compressionType + " pbf is not currently supported"); 96 98 case zlib: 97 99 return new InflaterInputStream(bais);
Note:
See TracChangeset
for help on using the changeset viewer.