def detect_byte_width(data, num_voxels, silent):
    """
    Detect byte width.

    :param data: Byte string with DF3 body.
    :param num_voxels: Number of voxels in file.
    :param silent: suppress output (info messages, progress etc.)

    """
    byte_width = int(float(len(data)) / num_voxels)
    if not silent:
        plural = ' s'[byte_width > 1]
        print("Voxel resolution: %d byte%s" % (byte_width, plural))

    return byte_width