Exemple #1
0
 public static BitVector Read(HpcBinaryReader reader)
 {
     Int32 len = reader.ReadCompactInt32();
     byte[] values = new byte[len];
     for (int i = 0; i < len; i++)
     {
         values[i] = reader.ReadUByte();
     }
     return new BitVector(values);
 }
Exemple #2
0
 public override int ReadByte()
 {
     while (true)
     {
         int b = this.m_curStream.ReadUByte();
         if (b != -1)
         {
             return(b);
         }
         if (this.m_nextStreamIdx == this.m_inputStreamArray.Length)
         {
             return(-1);
         }
         this.m_curStream = this.m_inputStreamArray[this.m_nextStreamIdx++];
     }
 }
Exemple #3
0
 public override int Read(byte[] buffer, int offset, int count)
 {
     while (true)
     {
         int n = this.m_curStream.ReadBytes(buffer, offset, count);
         if (n != 0)
         {
             return(n);
         }
         if (this.m_nextStreamIdx == this.m_inputStreamArray.Length)
         {
             return(0);
         }
         this.m_curStream = this.m_inputStreamArray[this.m_nextStreamIdx++];
     }
 }
Exemple #4
0
 public HpcLinqMultiInputStream(HpcBinaryReader[] streamArray)
 {
     this.m_inputStreamArray = streamArray;
     this.m_curStream        = streamArray[0];
     this.m_nextStreamIdx    = 1;
 }
 public HpcLinqMultiInputStream(HpcBinaryReader[] streamArray)
 {
     this.m_inputStreamArray = streamArray;
     this.m_curStream = streamArray[0];
     this.m_nextStreamIdx = 1;
 }
 public override int ReadByte()
 {
     while (true)
     {
         int b = this.m_curStream.ReadUByte();
         if (b != -1) return b;
         if (this.m_nextStreamIdx == this.m_inputStreamArray.Length) return -1;
         this.m_curStream = this.m_inputStreamArray[this.m_nextStreamIdx++];
     }
 }
 public override int Read(byte[] buffer, int offset, int count)
 {
     while (true)
     {
         int n = this.m_curStream.ReadBytes(buffer, offset, count);
         if (n != 0) return n;
         if (this.m_nextStreamIdx == this.m_inputStreamArray.Length) return 0;
         this.m_curStream = this.m_inputStreamArray[this.m_nextStreamIdx++];
     }
 }