public static TValue ReadValue <TValue>(this BinaryReader br, int bufferSize = 655360) { using (var ebr = new ExaBinaryReader <TValue>(bufferSize)) { return(ebr.Read(br)); } }
public static IEnumerable <TValue> EnumerateValues <TValue>(this BinaryReader br, int bufferSize = 655360) { using (var ebr = new ExaBinaryReader <IEnumerable <TValue> >(bufferSize)) { var enumerable = ebr.Read(br); if (enumerable != null) { foreach (var value in enumerable) { yield return(value); } } } }