public static class StateSpace.StateCompressor
extends java.lang.Object
implements nl.tue.storage.Deflater<byte[]>, nl.tue.storage.Inflater<byte[]>, nl.tue.storage.EqualOperation<byte[]>, nl.tue.storage.HashOperation<byte[]>
Constructor and Description |
---|
StateCompressor(int alignment) |
Modifier and Type | Method and Description |
---|---|
void |
deflate(byte[] state,
java.io.OutputStream stream)
deflate the given object into the provided stream.
|
boolean |
equals(byte[] object,
nl.tue.storage.CompressedStore<byte[]> store,
long l)
Check for equality between a given object and a location in the store.
|
int |
getHashCode(byte[] state)
Returns the hashCode of the given object.
|
int |
getHashCode(nl.tue.storage.CompressedStore<byte[]> store,
long l)
Returns the hashCode of the object stored in the store at index l.
|
int |
getMaxByteCount()
the method is called before each call to deflate.
|
byte[] |
inflate(java.io.InputStream stream)
read an object from a stream.
|
public void deflate(byte[] state, java.io.OutputStream stream) throws java.io.IOException
nl.tue.storage.Deflater
deflate
in interface nl.tue.storage.Deflater<byte[]>
java.io.IOException
public int getMaxByteCount()
nl.tue.storage.Deflater
getMaxByteCount
in interface nl.tue.storage.Deflater<byte[]>
public byte[] inflate(java.io.InputStream stream) throws java.io.IOException
nl.tue.storage.Inflater
inflate
in interface nl.tue.storage.Inflater<byte[]>
java.io.IOException
public boolean equals(byte[] object, nl.tue.storage.CompressedStore<byte[]> store, long l) throws nl.tue.storage.StorageException, java.io.IOException
nl.tue.storage.EqualOperation
equals
in interface nl.tue.storage.EqualOperation<byte[]>
nl.tue.storage.StorageException
java.io.IOException
public int getHashCode(byte[] state)
nl.tue.storage.HashOperation
getHashCode
in interface nl.tue.storage.HashOperation<byte[]>
public int getHashCode(nl.tue.storage.CompressedStore<byte[]> store, long l) throws nl.tue.storage.StorageException
nl.tue.storage.HashOperation
getHashCode
in interface nl.tue.storage.HashOperation<byte[]>
nl.tue.storage.StorageException