Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(12)  |  Derive(0)  |  Import(2)
A subclass of :class:`ZSError`, used specifically for errors that
indicate a malformed or corrupted ZS file.

src/z/s/zs-0.9.0/zs/reader.py   zs(Download)
from .futures import SerialExecutor, ProcessPoolExecutor
from .common import (ZSError,
    checksum = stream.read(CRC_LENGTH)
    if len(block_contents) != length or len(checksum) != CRC_LENGTH:
        raise ZSCorrupt("unexpected EOF")
    return block_contents, checksum
def _check_block(offset, raw_block, checksum):
    if encoded_crc64xz(raw_block) != checksum:
        raise ZSCorrupt("checksum mismatch at %s" % (offset,))
    block_level = indexbytes(raw_block, 0)
    zpayload = raw_block[1:]
        codec = header["codec"]
        if codec not in codecs:
            raise ZSCorrupt("unrecognized compression codec %r"
                             % (codec,))
        self._decompress = codecs[codec][-1]
        actual_length = self._transport.length()
        if actual_length != self.total_file_length:
            raise ZSCorrupt("file is %s bytes, but header says it should "
                             "be %s"
                             % (actual_length, self.total_file_length))

src/z/s/zs-0.9.0/zs/__init__.py   zs(Download)
# This file is part of ZS
# Copyright (C) 2013-2014 Nathaniel Smith <njs@pobox.com>
# See file LICENSE.txt for license information.
from .common import ZSError, ZSCorrupt