dopt method
dynamic
dopt(
- List<int> dat,
- Map opt,
- dynamic pre,
- dynamic post, [
- Map? st,
])
Implementation
dopt(List<int> dat, Map opt, pre, post, [Map? st]) {
if (st == null) {
st = { 'l': 1 };
if (opt['dictionary'] != null) {
var dict = opt['dictionary'].sublist(-32768);
u8 newDat = u8(dict.length + dat.length);
newDat.setAll(0,dict);
newDat.setAll(dict.length, dat);//[dat] = dict.length;
dat = newDat;
st['w'] = dict.length;
}
}
return dflt(dat, opt['level'] == null ? 6 : opt['level'], opt['mem'] == null ? (st['l'] != 0? (math.max(8, math.min(13, math.log(dat.length))) * 1.5).ceil() : 20) : (12 + opt['mem']), pre, post, st);
}