-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also: fix viaInputStream queueSize parameter
- Loading branch information
1 parent
41c3dd1
commit 11eab1d
Showing
11 changed files
with
327 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package zio.compress | ||
|
||
sealed abstract class Bzip2BlockSize(val jValue: Int) | ||
|
||
object Bzip2BlockSize { | ||
case object BlockSize100KB extends Bzip2BlockSize(1) | ||
case object BlockSize200KB extends Bzip2BlockSize(2) | ||
case object BlockSize300KB extends Bzip2BlockSize(3) | ||
case object BlockSize400KB extends Bzip2BlockSize(4) | ||
case object BlockSize500KB extends Bzip2BlockSize(5) | ||
case object BlockSize600KB extends Bzip2BlockSize(6) | ||
case object BlockSize700KB extends Bzip2BlockSize(7) | ||
case object BlockSize800KB extends Bzip2BlockSize(8) | ||
case object BlockSize900KB extends Bzip2BlockSize(9) | ||
|
||
private val Values: Seq[Bzip2BlockSize] = | ||
Seq( | ||
BlockSize100KB, | ||
BlockSize200KB, | ||
BlockSize300KB, | ||
BlockSize400KB, | ||
BlockSize500KB, | ||
BlockSize600KB, | ||
BlockSize700KB, | ||
BlockSize800KB, | ||
BlockSize900KB | ||
) | ||
|
||
/** Converts a bzip2 block size from [[Int]] to [[Bzip2BlockSize]]. | ||
* | ||
* @param blockSize100KB | ||
* a bzip2 block size in 100KB increments, valid values: 1 to 9 | ||
*/ | ||
def fromBzip2BlockSize(blockSize100KB: Int): Option[Bzip2BlockSize] = | ||
Values.find(_.jValue == blockSize100KB) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package zio.compress | ||
|
||
object Defaults { | ||
val DefaultChunkSize: Int = 1024 * 64 | ||
val DefaultChunkSize: Int = 64 * 1024 | ||
val DefaultChunkedQueueSize: Int = 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.