def __init__(self, slot, compress=None):
assert slot is None or type(slot) in six.integer_types<EOL>assert compress is None or compress in [PersistentMap.COMPRESS_ZLIB, PersistentMap.COMPRESS_SNAPPY]<EOL>self._slot = slot<EOL>if compress:<EOL><INDENT>if compress not in [PersistentMap.COMPRESS_ZLIB, PersistentMap.COMPRESS_SNAPPY]:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if compress == PersistentMap.COMPRESS_SNAPPY and not HAS_SNAPPY:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>if compress == PersistentMap.COMPRESS_ZLIB:<EOL><INDENT>self._compress = zlib.compress<EOL>self._decompress = zlib.decompress<EOL><DEDENT>elif compress == PersistentMap.COMPRESS_SNAPPY:<EOL><INDENT>self._compress = snappy.compress<EOL>self._decompress = snappy.uncompress<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._compress = lambda data: data<EOL>self._decompress = lambda data: data<EOL><DEDENT>self._indexes = {}<EOL>
:param slot:
:param compress: