def __init__()

in sparkey/__init__.py [0:0]


    def __init__(self, hashfile, logfile, mode='NEW',
                 compression_type=Compression.NONE, compression_block_size=0,
                 hash_size=0):
        """Creates a new writer.

        Does everything that L{LogWriter} does, but also writes the
        hash file.

        @param hashfile: filename of hash file

        @param logfile: filename of log file

        @param mode: Same as in L{LogWriter.__init__}

        @param compression_type: Same as in L{LogWriter.__init__}

        @param compression_block_size: Same as in L{LogWriter.__init__}

        @param hash_size: Valid values are 0, 4, 8. 0 means autoselect
                          hash size . 4 is 32 bit hash, 8 is 64 bit hash.

        """
        self._logwriter = LogWriter(logfile, mode, compression_type,
                                    compression_block_size)
        self._hashfile = hashfile
        self._logfile = logfile
        self._reader = None
        self._hash_size = hash_size