MCPcopy Create free account
hub / github.com/apache/fory / ReadData

Method ReadData

csharp/src/Fory/PrimitiveArraySerializers.cs:398–414  ·  view source on GitHub ↗
(ReadContext context)

Source from the content-addressed store, hash-verified

396 }
397
398 public override float[] ReadData(ReadContext context)
399 {
400 int byteSize = checked((int)context.Reader.ReadVarUInt32());
401 if ((byteSize & 3) != 0)
402 {
403 throw new InvalidDataException("float32 array byte size mismatch");
404 }
405
406 context.Reader.CheckBound(byteSize);
407 float[] values = new float[byteSize / 4];
408 for (int i = 0; i < values.Length; i++)
409 {
410 values[i] = context.Reader.ReadFloat32();
411 }
412
413 return values;
414 }
415}
416
417internal sealed class Float64ArraySerializer : Serializer<double[]>

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadFloat32Method · 0.45

Tested by

no test coverage detected