The unit DSTRUCT contains several classes which support commonly used data structures (FIFO buffers, and bit arrays, string arrays).
- The class TAssocArray provides an associative string array which is comparable to the array found in PHP.
- The class TFifo supports the handling of First-In-First-Out (FIFO) and Last-In-First-Out (LIFO) buffers. FIFOs are commonly used for the communication of asynchronous processes.
- The class TBitFld supports boolean arrays of a size of up to 2^31 entries (approx. 2 billion). TBitFld is highly memory efficient, using only one bit per entry. Each element of the array is addressed by a number between 0 and the maximum specified length of the array.
- The class TByteMatrix provides a two-dimensional matrix of bytes.
- The class TRLEncoder supports the run length encoding of byte streams.
- The class TStringAccu supports the counting of strings.
- The class TStringArray has been designed for store arrays of strings with special attention to (1) the ease of sorting, (2) the transparent and efficient handling of strings of different lengths, and (3) the efficient use of memory for large sparse arrays.
What's new:
- Release 10.7 [Aug-24, 2020]
- implemented the routines DecodeBase64 and EncodeBase64 to support base-64 encoding
- EncodeASCII85 now allows to insert line breaks
- implemented TAssocArray.Assign
- the new methods InsertColumn and RemoveColumn insert and remove a column to/from the string array
- the new property TByteMatrix.DefaultValue allows to control the returned value, if the index of a byte is out of range
- added the following methods of TFeatureMatrix: RemoveFeature, SetFeatType, RenumberFeatures, GenerateFeatNames
- Release 10.6 [Mar-09, 2018]
- the new class TFeatureMatrix supports mixed-type two-dimensional matrices
- the TStringArray class supports now the Assign method
- the class TAssocArray provides now the method ResolveAsInt
- Release 10.5 [Oct-10, 2016]
- the TBitFld class provides now the Assign method
- the TStringArray class provides now the array property AsInteger
- bug fix: SHA1FromFile, SHA1FromString and SHA1FromStream returned wrong results in 64-bit mode
- Release 10.4 [Jun-02, 2015]
- no changes
- Release 10.3 [Oct-06, 2014]
- methods TByteMatrix.MirrorRows and TByteMatrix.MirrorColumns implemented
- Release 10.2 [May-30, 2013]
- the new class TStringAccu provides a way to count strings
- Release 10.1 [Oct-29, 2012]
- the new method TBitFld.MakeListOfBits creates a list of the indices of bits of a particular state
- the method TBitFld.RandomFill has been extended
- Release 10.0 [Oct-4, 2011]
- the new method TBitFld.Clone creates a complete copy of an existing bit array
- Release 9.7 [May-31, 2010]
- new method TStringArray.CopyRow implemented
- Release 9.51 [Dec-01, 2008]
- search direction for the methods TStringArray.FindCell and TStringArray.FindCellExact has been changed (they now search the string array rowwise)
- bug fix: TAssocArray.Remove now works as expected
- Release 9.5 [Oct-31, 2008]
- Sort method now provides a secondary sorting key
- Release 9.0 [May-28, 2007]
- associative arrays support now the retrieval of strings and numbers (ResolveAsString and ResolveAsNumber)
- routines for calculating hash codes implemented: SHA1FromString, SHA1FromStream, SHA1FromFile, and SHA1DigestToHex
- Release 8.5 [Feb-18, 2006]
- bug fix in CalcCRC32ofFile: this routine now opens the file in read-only mode
- TStringArray now has an OnBeforeSortExchange event to influence the sort order
- Release 8.2 [Nov-03, 2004]
- no changes
- Release 8.1 [Aug-29, 2004]
- available for Delphi™ 8 for .NET
- TStringArray is now inherited from TComponent
- new component TByteMatrix implemented
- bug fix: FindCellInSortedColumn now correctly finds the first item if several equal strings are stored in subsequent rows
- bug fix: TStringArray now correctly clears its internal memory if the number of rows of the string array is reduced (bug has been introduced with version 8.0)
- Release 8.0 [Apr-15, 2004]
- new class TAssocArray provides an associative array of strings
- IndexOfNearestArrayValue implemented
- TBitFld: new method FirstTrueBit implemented
- CRC16ofBuffer and CRC32ofBuffer changed from buffer pointer to open byte array TBytes
- class TStringArray: CommitSorting implemented
- OnPercentDone event implemented for TStringArray
- new function NextPermutation implemented
- bug fix: TBitFld.CountTrueBits returned wrong result if last bit in a bit field of (size mod 8 = 0) has been set
- bug fix in TStringArray: reducing array size does no longer destroy sort index
- Release 7.2 [Mar-23, 2003]
- DSTRUCT is now part of BasePack
- CalcCRC32ofFile implemented
- TBitFld, TFifo are now inherited from TComponent
- Release 7.0 [Sep-15, 2002]
- available for Delphi™ 7.0
- the unit is now CLX compatible
- Release 6.5 [May-28, 2002]
- available for C++Builder™ 6.0
- TStringArray: LoadFromXMLFile, ReadFromOpenXMLFile, SaveAsXMLFile, WriteToOpenXMLFile implemented
- bug fix: RemoveRow now only empties last row, no break down of code
- bug fix: InsertRow does no longer destroy the sort order
- Release 6.0 [Aug-06, 2001]
- available for Delphi™ 6.0
- new procedures EncodeASCII85 and DecodeASCII85 implemented
- FindCellExact implemented
- property Bit of TBitFld is now default property
- TStringArray.SortOrder is now writable
- bug fix in FindCell: algorithm works now correctly for multi-column searches
- Release 5.5 [Jun-09, 2000]
- available for C++Builder™ 5.0
- TStringArray: new property SortOrder implemented
- property TStringArray.ColAttrib implemented
- function FindCellInSortedColumn implemented
- CRC routines implemented (CCITT and 32 bit CRC used in Ethernet LANs)
- bug fix in RL-Encoder (caused faulty compression under rare circumstances)
- Release 5.0 [Oct-02, 1999]
- available for Delphi™ 5.0
- method AsNumber of class TStringArray implemented
- method TStringArray.ColumnEmpty and TStringArray.RowEmpty implemented
- method TStringArray.FindCell implemented
- TStringArray - bug fix: deallocation of memory works now correctly
- property TStringArray.RowAttrib implemented
- TStringArray: sorting no longer discriminates between lowercase and uppercase letters
- TStringArray.AddRow implemented
- TStringArray.RemoveRow implemented
- TStringArray.InsertRow implemented
- bug fix in TStringArray.Sort: sort no longer hangs if only one row in string array
- bug fix in TStringArray.Sort: sort no longer hangs for arrays with more than 2^16 rows
- Release 1.4 [Mar-23, 1999]
- DSTRUCT is now available for C++Builder™ 4.0
- DSTRUCT is now available for C++Builder™ 4.0
- Release 1.3 [Feb-19, 1999]
- class TStringArray implemented
- DSTRUCT is no longer available for Delphi™ 1.0
- Release 1.2 [Aug-13, 1998]
- DSTRUCT is now available for Delphi™ 4.0
- DSTRUCT is now available for Delphi™ 4.0
- Release 1.1 (Apr-14, 1998)
- Logic operators of CombineWith extended by loANDNot, loORNot, and loXORNot
- new method of FIFO: ForceByte
- RLEncoder implemented
- NextCombination implemented
- DSTRUCT is now available for all versions of Delphi™ (1.0, 2.0, 3.0), and for C++Builder™ (1.0 and 3.0)