public static T NextChunk <T, U>(this IMarkedBitReader reader, int bits, string name, U context, Func <int, U, T> mapper) { reader.MarkStart(); T result = mapper(reader.NextChunk(bits), context); reader.MarkEndValue(name, result !); return(result); }
public static int NextChunk(this IMarkedBitReader reader, int bits, string name) { reader.MarkStart(); int result = reader.NextChunk(bits); reader.MarkEndValue(name, result); return(result); }