예제 #1
0
파일: writer.cs 프로젝트: zjmit/go2cs
            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
파일: writer.cs 프로젝트: zjmit/go2cs
 private static error Flush(this blockWriter b)
 {
     return(error.As(b.e.err) !);
 }
예제 #3
0
파일: writer.cs 프로젝트: zjmit/go2cs
 private static void setup(this blockWriter b)
 {
     b.e.buf[0L] = 0L;
 }