Lines Matching refs:bytes

55         private readonly byte[] bytes;  field in Google.Protobuf.ByteString
66 internal static ByteString FromBytes(byte[] bytes) in FromBytes() argument
68 return new ByteString(bytes); in FromBytes()
75 internal static ByteString AttachBytes(byte[] bytes) in AttachBytes() argument
77 return new ByteString(bytes); in AttachBytes()
84 private ByteString(byte[] bytes) in ByteString() argument
86 this.bytes = bytes; in ByteString()
102 get { return bytes.Length; }
118 public ReadOnlySpan<byte> Span => new ReadOnlySpan<byte>(bytes);
128 return (byte[]) bytes.Clone(); in ToByteArray()
137 return Convert.ToBase64String(bytes); in ToBase64()
143 public static ByteString FromBase64(string bytes) in FromBase64() argument
147 return bytes == "" ? Empty : new ByteString(Convert.FromBase64String(bytes)); in FromBase64()
164 byte[] bytes = memoryStream.ToArray(); in FromStream()
167 …byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStr… in FromStream()
169 return AttachBytes(bytes); in FromStream()
190 byte[] bytes = memoryStream.ToArray(); in FromStreamAsync()
193 …byte[] bytes = memoryStream.Length == memoryStream.Capacity ? memoryStream.GetBuffer() : memoryStr… in FromStreamAsync()
195 return AttachBytes(bytes); in FromStreamAsync()
206 public static ByteString CopyFrom(params byte[] bytes) in CopyFrom() argument
208 return new ByteString((byte[]) bytes.Clone()); in CopyFrom()
214 public static ByteString CopyFrom(byte[] bytes, int offset, int count) in CopyFrom() argument
217 ByteArray.Copy(bytes, offset, portion, 0, count); in CopyFrom()
227 public static ByteString CopyFrom(ReadOnlySpan<byte> bytes) in CopyFrom() argument
229 return new ByteString(bytes.ToArray()); in CopyFrom()
255 get { return bytes[index]; }
269 return encoding.GetString(bytes, 0, bytes.Length); in ToString()
291 return ((IEnumerable<byte>) bytes).GetEnumerator(); in GetEnumerator()
309 return new CodedInputStream(bytes); in CreateCodedInput()
328 if (lhs.bytes.Length != rhs.bytes.Length) in operator ==()
334 if (rhs.bytes[i] != lhs.bytes[i]) in operator ==()
371 foreach (byte b in bytes) in GetHashCode()
393 outputStream.WriteRawBytes(bytes, 0, bytes.Length); in WriteRawBytesTo()
401 ByteArray.Copy(bytes, 0, array, position, bytes.Length); in CopyTo()
409 outputStream.Write(bytes, 0, bytes.Length); in WriteTo()