Skip to content

Commit

Permalink
IByteSegments - missing method to get byte segment #154
Browse files Browse the repository at this point in the history
  • Loading branch information
E Spelt committed Aug 23, 2023
1 parent 4eb3919 commit 47fcc7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Lib/Classes/Common/ZXIng.ByteSegments.pas
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface
procedure SetCapacity(const Value: integer);
property Capacity:integer read GetCapacity write SetCapacity;
function Add(const item:TArray<byte>):integer;
function Get(index: integer):TArray<byte>;
end;


Expand All @@ -33,6 +34,7 @@ TByteSegments = class(TInterfacedObject,IByteSegments)
function GetCapacity: integer;
procedure SetCapacity(const Value: integer);
function Add(const item:TArray<byte>):integer;
function Get(index: integer):TArray<byte>;
public
destructor Destroy; override;
end;
Expand Down Expand Up @@ -86,4 +88,9 @@ procedure TByteSegments.SetCapacity(const Value: integer);
FList.Capacity := value;
end;

function TByteSegments.Get(index: Integer) : TArray<byte>;
begin
Result := FList[index];
end;

end.

0 comments on commit 47fcc7d

Please sign in to comment.