[#41] Add APE rule serializer

Signed-off-by: Ori Bruk <o.bruk@yadro.com>
This commit is contained in:
Ori Bruk 2025-02-13 20:25:29 +03:00
parent 532db56f1b
commit 3861eb0dc2
28 changed files with 542 additions and 143 deletions

View file

@ -0,0 +1,27 @@
package info.frostfs.sdk.constants;
public class RuleConst {
public static final byte VERSION = 0;
public static final int BYTE_SIZE = 1;
public static final int U_INT_8_SIZE = BYTE_SIZE;
public static final int BOOL_SIZE = BYTE_SIZE;
public static final long NULL_SLICE = -1L;
public static final int NULL_SLICE_SIZE = 1;
public static final byte BYTE_TRUE = 1;
public static final byte BYTE_FALSE = 0;
// maxSliceLen taken from
// https://github.com/neo-project/neo/blob/38218bbee5bbe8b33cd8f9453465a19381c9a547/src/Neo/IO/Helper.cs#L77
public static final int MAX_SLICE_LENGTH = 0x1000000;
public static final int CHAIN_MARSHAL_VERSION = 0;
public static final long OFFSET128 = 0x80;
public static final long UNSIGNED_SERIALIZE_SIZE = 7;
private RuleConst() {
}
}