[LZMA] Add default values for lc, lp, pb, and dictionarySize properties of LZMAProperties

This commit is contained in:
Timofey Solomko
2019-03-13 12:16:42 +03:00
parent 04f64bcb72
commit 5ebe98796f
+8 -8
View File
@@ -8,22 +8,22 @@ import BitByteData
/// Properties of LZMA. This API is intended to be used by advanced users.
public struct LZMAProperties {
/// Number of bits used for the literal encoding context.
public var lc: Int
/// Number of bits used for the literal encoding context. Default value is 3.
public var lc: Int = 3
/// Number of bits to include in "literal position state".
public var lp: Int
/// Number of bits to include in "literal position state". Default value is 0.
public var lp: Int = 0
/// Number of bits to include in "position state".
public var pb: Int
/// Number of bits to include in "position state". Default value is 2.
public var pb: Int = 2
/**
Size of the dictionary.
Size of the dictionary. Default value is 1 << 24.
- Note: Dictionary size cannot be less than 4096. In case of attempt to set it to the value less than 4096 it will
be automatically set to 4096 instead.
*/
public var dictionarySize: Int {
public var dictionarySize: Int = 1 << 24 {
didSet {
if dictionarySize < 1 << 12 {
dictionarySize = 1 << 12