public class BinaryUtil extends Object
| Constructor and Description |
|---|
BinaryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
zigzagDecode(int value)
Decodes the result of
zigzagEncode(int) to its original signed value. |
static long |
zigzagDecode(long value)
Decodes the result of
zigzagEncode(long) to its original signed value. |
static int |
zigzagEncode(int value)
Zig-zag encodes the given
int producing a small positive number for inputs with small absolute
value. |
static long |
zigzagEncode(long value)
Zig-zag encodes the given
long producing a small positive number for inputs with small absolute
value. |
public static int zigzagEncode(int value)
int producing a small positive number for inputs with small absolute
value.value - The value to encode.public static long zigzagEncode(long value)
long producing a small positive number for inputs with small absolute
value.value - The value to encode.public static int zigzagDecode(int value)
zigzagEncode(int) to its original signed value.value - The value to decode.public static long zigzagDecode(long value)
zigzagEncode(long) to its original signed value.value - The value to decode.Copyright © 2021. All rights reserved.