targetFromCompact static method
Compact bits -> target (toy implementation similar to Bitcoin's compact format).
Implementation
static BigInt targetFromCompact(int compact) {
final size = (compact >> 24) & 0xff;
final word = compact & 0x007fffff;
BigInt result = BigInt.from(word) << (8 * (size - 3));
return result;
}