Changeset 247 for CoolStreaming
- Timestamp:
- May 24, 2011, 12:36:12 PM (14 years ago)
- Location:
- CoolStreaming
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolStreaming/UBitStream.pas
r128 r247 28 28 function CopyFrom(Source: TBitStream; Count: LongInt): LongInt; 29 29 function Write(const Buffer; Count: Longint): Longint; virtual; 30 function EqualTo(Source: TBitStream): Boolean; 30 31 function GetString: string; 31 32 procedure SetString(const AValue: string); 32 33 procedure ReadBuffer(var Buffer; Count: Longint); 33 34 procedure WriteBuffer(const Buffer; Count: Longint); 34 property Position: LongInt read GetPosition write SetPosition;35 property Size: LongInt read GetSize write SetSize;36 property Bit[Index: Integer]: Boolean read GetBit write SetBit;37 38 35 function ReadBit: Boolean; 39 36 procedure WriteBit(AValue: Boolean); 40 37 function ReadNumber(Count: Byte): QWord; 41 38 procedure WriteNumber(AValue: QWord; Count: Byte); 39 property Position: LongInt read GetPosition write SetPosition; 40 property Size: LongInt read GetSize write SetSize; 41 property Bit[Index: Integer]: Boolean read GetBit write SetBit; 42 42 property AsString: string read GetString write SetString; 43 43 end; … … 64 64 end; 65 65 66 66 67 implementation 67 68 … … 133 134 begin 134 135 Result := 0; 136 end; 137 138 function TBitStream.EqualTo(Source: TBitStream): Boolean; 139 var 140 I: Integer; 141 begin 142 if Size = Source.Size then begin 143 I := 0; 144 Result := True; 145 Position := 0; 146 Source.Position := 0; 147 while (I < Size) and (ReadBit = Source.ReadBit) do Inc(I); 148 if I < Size then Result := False; 149 end else Result := False; 135 150 end; 136 151 -
CoolStreaming/UVarBlockSerializer.pas
r222 r247 791 791 VarBlock.Stream.Position := 0; 792 792 Mask := VarBlock.ReadVarUInt; 793 Items.Clear; 793 794 I := 0; 794 795 while Mask <> 0 do begin
Note:
See TracChangeset
for help on using the changeset viewer.