public void Read(IInputStream input) { this.hashA = input.ReadLong(); this.hashB = input.ReadLong(); this.index = input.ReadInt(); this.keySize = input.ReadInt(); this.key = UTF8Encoding.UTF8.GetString(input.ReadBytes(keySize), 0, keySize); this.fileDate = input.ReadInt(); this.fileMD5Size = input.ReadInt(); this.fileMD5 = UTF8Encoding.UTF8.GetString(input.ReadBytes(fileMD5Size), 0, fileMD5Size); this.fileOffset = input.ReadInt(); this.fileSize = input.ReadInt(); }
private byte[] UnpackBytes(int size) { var heapBuffer = new byte[size]; _in.ReadBytes(heapBuffer); return(heapBuffer); }
public void Read(IInputStream input) { this.head = input.ReadBytes(4); this.headerSize = input.ReadInt(); this.versionNum = input.ReadInt(); this.archiveSize = input.ReadInt(); this.entriesCount = input.ReadInt(); this.entriesOffset = input.ReadInt(); this.blocksOffset = input.ReadInt(); }
void IMessage.ReadFrom(IInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { case 9: _fdouble = input.ReadDouble(); break; case 21: _ffloat = input.ReadFloat(); break; case 24: _fint32 = input.ReadInt32(); break; case 32: _fint64 = input.ReadInt64(); break; case 40: _fuint32 = input.ReadUInt32(); break; case 48: _fuint64 = input.ReadUInt64(); break; case 56: _fsint32 = input.ReadSInt32(); break; case 64: _fsint64 = input.ReadSInt64(); break; case 77: _ffixed32 = input.ReadFixed32(); break; case 81: _ffixed64 = input.ReadFixed64(); break; case 93: _fsfixed32 = input.ReadSFixed32(); break; case 97: _fsfixed64 = input.ReadSFixed64(); break; case 104: _fbool = input.ReadBool(); break; case 114: _fstring = input.ReadString(); break; case 122: _fbytes = input.ReadBytes(); break; case 128: _fenum = (SomeEnum)input.ReadEnum(); break; case 138: if (_finner == null) { _finner = new InnerMessage(); } input.ReadMessage(_finner); break; case 146: if (_frep == null) { _frep = new global::System.Collections.Generic.List <InnerMessage>(); } input.ReadRepeated(_frep.Add, _tinyRepeatedTypeTestroot_Classes_InnerMessage, x => _frep.Capacity = _frep.Count + x); break; case 152: if (_frepEnum == null) { _frepEnum = new global::System.Collections.Generic.List <SomeEnum>(); } input.ReadRepeated(_frepEnum.Add, _tinyRepeatedTypeTestroot_Classes_TestEnum, x => _frepEnum.Capacity = _frepEnum.Count + x); break; case 162: if (_frepString == null) { _frepString = new global::System.Collections.Generic.List <string>(); } input.ReadRepeated(_frepString.Add, RepeatedTypes.String, x => _frepString.Capacity = _frepString.Count + x); break; case 173: if (_frepFixed32 == null) { _frepFixed32 = new global::System.Collections.Generic.List <uint>(); } input.ReadRepeated(_frepFixed32.Add, RepeatedTypes.Fixed32, x => _frepFixed32.Capacity = _frepFixed32.Count + x); break; case 176: if (_frepUint32 == null) { _frepUint32 = new global::System.Collections.Generic.List <uint>(); } input.ReadRepeated(_frepUint32.Add, RepeatedTypes.UInt32, x => _frepUint32.Capacity = _frepUint32.Count + x); break; default: input.SkipField(); break; } } }