Пример #1
0
            private static error WriteByte(this blockWriter b, byte c)
            {
                if (b.e.err != null)
                {
                    return(error.As(b.e.err) !);
                }

                // Append c to buffered sub-block.
                b.e.buf[0L]++;
                b.e.buf[b.e.buf[0L]] = c;
                if (b.e.buf[0L] < 255L)
                {
                    return(error.As(null !) !);
                }

                // Flush block
                b.e.write(b.e.buf[..256L]);
Пример #2
0
 private static error Flush(this blockWriter b)
 {
     return(error.As(b.e.err) !);
 }
Пример #3
0
 private static void setup(this blockWriter b)
 {
     b.e.buf[0L] = 0L;
 }