Package com.jackmeng.core.util
Class use_Blurhash.blurhash_base83
java.lang.Object
com.jackmeng.core.util.use_Blurhash.blurhash_base83
- Enclosing class:
- use_Blurhash
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intDecodes from Base 83static voidstatic voidstatic voidencode(long val, int length, char[] buff, int offset) Encodes with Base 83.static longencodeAC(double[] val, double m) static longencodeDC(double[] val) static intfind(char c) static doublesignpow(double val, double exp)
-
Field Details
-
TABLE
public static final char[] TABLE
-
-
Constructor Details
-
blurhash_base83
private blurhash_base83()
-
-
Method Details
-
signpow
public static double signpow(double val, double exp) - Parameters:
val-exp-- Returns:
- double
-
encode
public static void encode(long val, int length, char[] buff, int offset) Encodes with Base 83.- Parameters:
val- The value to encodelength- The length of the valuebuff- The buffer to write to (contains values)offset- The offset to start writing at
-
encodeDC
public static long encodeDC(double[] val) - Parameters:
val-- Returns:
- long
-
encodeAC
public static long encodeAC(double[] val, double m) - Parameters:
val-m-- Returns:
- long
-
decode
Decodes from Base 83- Parameters:
str- An Encoded String- Returns:
- The decoded string from base 83
-
decodeAC
- Parameters:
str-rMv-color-
-
decodeDC
- Parameters:
str-colors-
-
find
public static int find(char c) - Parameters:
c-- Returns:
- int
-