Compare bytes from {#getBytes()} to those provided.
160029
public int compareTo(byte[] other, int off, int len) {
        return WritableComparator.compareBytes(getBytes(), 0, getLength(), other, off, len);
    }
673897
static public int compare(byte[] first, byte[] second) {
        // choose the shorter array length
        int firstLength = first.length;
        int secondLength = second.length;
        int shorterLength = Math.min(firstLength, secondLength);

        // compare matching bytes
        for (int i = 0; i < shorterLength; i++) {
            int result = Byte.compare(first[i], second[i]);
            if (result != 0) return Integer.signum(result);
        }

        // compare lengths if bytes match
        if (firstLength < secondLength) return -1;
        if (firstLength > secondLength) return 1;

        // must be same length and equal
        return 0;
    }
1246784
public void getBytes(byte[] val) throws IOException {
        if ((val.length != 0) && (buffer.read(val) != val.length)) {
            throw new IOException("short read of DER octet string");
        }
    }
171323
def visit_Bytes(self, node: ast.Bytes) -> bytes:
        """"""
        result = node.s

        self.recomputed_values[node] = result
        return node.s
61119
def get_bytes(self):
        """"""

        ret = struct.pack("<I16s16s", set_client_DH_params.constructor, self.nonce, self.server_nonce)

        bytes_io = BytesIO()
        bytes_io.write(ret)
        serialize_string(bytes_io, self.encrypted_data)

        return bytes_io.getvalue()
268457
function ChunkedStream_getBytes(length) {
      var bytes = this.bytes;
      var pos = this.pos;
      var strEnd = this.end;

      if (!length) {
        this.ensureRange(pos, strEnd);
        return bytes.subarray(pos, strEnd);
      }

      var end = pos + length;
      if (end > strEnd) {
        end = strEnd;
      }
      this.ensureRange(pos, end);

      this.pos = end;
      return bytes.subarray(pos, end);
    }
650324
def b(s):
	

	return s if isinstance(s, bytes) else s.encode(locale.getpreferredencoding())
1024759
def bytes(self):
        
        if self._filename:
            with open(self._filename, "rb") as f:
                return f.read()
        else:
            return self._bytes
1061276
@SuppressWarnings("unused")
	private static void checkNotTheSame(byte[] bs, byte[] bytes) {
		if (bs.length == bytes.length) {
			System.out.println("same length!");
			boolean same = true;
			for (int i = 0; i < bs.length; i++) {
				if (bs[i] != bytes[i]) {
					same = false;
					break;
				}
			}
			if (same) {
				System.out.println("same data!!");
			}
			else {
				System.out.println("diff data");
			}
		}
		else {
			System.out.println("different");
		}
	}
1012353
def decodebytes(input):
    """"""
    py_version = sys.version_info[0]
    if py_version >= 3:
        return _decodebytes_py3(input)
    return _decodebytes_py2(input)
673436
public int getBytes(byte[] buf, int offset, int length)
    {
        if (length>unconsumedData())
            length=unconsumedData();
        System.arraycopy(_buf,_pos,buf,offset,length);
        _pos+=length;
        return length;
    }
1109143
public byte[] getBytes() throws IOException {
        if (!connection.isOpen())
            connection.open();

        connection.prepare("GET");
        response = connection.readInput();
        return getResponseBytes();
    }
753314
def cast_bytes(s, encoding=None):
    """"""
    if not isinstance(s, bytes):
        return encode(s, encoding)
    return s
1063902
def convert_bytes(bytes_, K=1 << 10, M=1 << 20, G=1 << 30, T=1 << 40):
    """"""
    fn = float(bytes_)
    if bytes_ >= T:
        return '%.1fT' % (fn / T)
    elif bytes_ >= G:
        return '%.1fG' % (fn / G)
    elif bytes_ >= M:
        return '%.1fM' % (fn / M)
    elif bytes_ >= K:
        return '%.1fK' % (fn / K)
    else:
        return '%d' % bytes_
298522
def bytes(self):
        """"""
        flagByte = 0x00
        messageType = 0
        if self._messageType is not None:
            messageType = self._messageType << 5
        extendedBit = 0 if self._extended is None else self._extended << 4
        hopsMax = 0 if self._hopsMax is None else self._hopsMax
        hopsLeft = 0 if self._hopsLeft is None else (self._hopsLeft << 2)
        flagByte = flagByte | messageType | extendedBit | hopsLeft | hopsMax
        return bytes([flagByte])
414194
def extract_bytes(mv):
    """"""
    if isinstance(mv, memoryview):
        return mv.tobytes() if six.PY3 else bytes(mv)

    if isinstance(mv, bytes):
        return mv

    raise ValueError
127836
def _readbytes(self, length, start):
        """"""
        assert length % 8 == 0
        assert start + length <= self.len
        if not (start + self._offset) % 8:
            return bytes(self._datastore.getbyteslice((start + self._offset) // 8,
                                                      (start + self._offset + length) // 8))
        return self._slice(start, start + length).tobytes()