Get the in-RAM zonefile inventory vector.
    offset and length are in *bytes*

def atlas_get_zonefile_inventory( offset=None, length=None ):
    """
    Get the in-RAM zonefile inventory vector.
    offset and length are in *bytes*
    """
    global ZONEFILE_INV, ZONEFILE_INV_LOCK

    with ZONEFILE_INV_LOCK:
        try:
            assert ZONEFILE_INV is not None
        except AssertionError:
            log.error("FATAL: zonefile inventory not loaded")
            os.abort()

        if offset is None:
            offset = 0

        if length is None:
            length = len(ZONEFILE_INV) - offset

        if offset >= len(ZONEFILE_INV):
            return ""

        if offset + length > len(ZONEFILE_INV):
            length = len(ZONEFILE_INV) - offset
            
        ret = ZONEFILE_INV[offset:offset+length]
        return ret