public class BitUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
log2(long n)
Number of bits needed to store up to n
|
static long |
maxVal(int numbits) |
static long |
readLowerBitsByteAligned(long numbits,
InputStream in) |
static int |
select0(long value,
int rank) |
static int |
select1(long value,
int rank) |
static void |
writeLowerBitsByteAligned(long value,
long numbits,
OutputStream out) |
public static int log2(long n)
n - public static long maxVal(int numbits)
public static long readLowerBitsByteAligned(long numbits,
InputStream in)
throws IOException
IOExceptionpublic static void writeLowerBitsByteAligned(long value,
long numbits,
OutputStream out)
throws IOException
IOExceptionpublic static int select1(long value,
int rank)
public static int select0(long value,
int rank)
Copyright © 2018 DataWeb Research. All rights reserved.