Changeset 572


Ignore:
Timestamp:
Jun 25, 2024, 1:37:11 AM (3 months ago)
Author:
chronos
Message:
Location:
CoolStreaming
Files:
15 edited
7 moved

Legend:

Unmodified
Added
Removed
  • CoolStreaming/BitStream.pas

    r571 r572  
    1 unit UBitStream;
     1unit BitStream;
    22
    33// Date: 2010-08-17
    44
    5 {$mode delphi}
    6 
    75interface
    86
    97uses
    10   Classes, SysUtils, RtlConsts, Math, UMemory;
     8  Classes, SysUtils, RtlConsts, Math, Memory;
    119
    1210type
     
    343341destructor TMemoryBitStream.Destroy;
    344342begin
    345   FMemory.Free;
    346   inherited Destroy;
     343  FreeAndNil(FMemory);
     344  inherited;
    347345end;
    348346
  • CoolStreaming/BufferedFileStream.pas

    r571 r572  
    1 unit UBufferedFileStream;
     1unit BufferedFileStream;
    22
    33interface
     
    3131    property BufferUsed: Integer read GetBufferUsed;
    3232  end;
     33
    3334
    3435implementation
  • CoolStreaming/CoolStreaming.lpk

    r405 r572  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    3   <Package Version="4">
     3  <Package Version="5">
    44    <PathDelim Value="\"/>
    55    <Name Value="CoolStreaming"/>
     6    <Type Value="RunAndDesignTime"/>
    67    <AddToProjectUsesSection Value="True"/>
    78    <Author Value="Chronos"/>
     
    1011      <PathDelim Value="\"/>
    1112      <SearchPaths>
    12         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     13        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1314      </SearchPaths>
     15      <Parsing>
     16        <SyntaxOptions>
     17          <SyntaxMode Value="Delphi"/>
     18          <CStyleOperator Value="False"/>
     19          <AllowLabel Value="False"/>
     20          <CPPInline Value="False"/>
     21        </SyntaxOptions>
     22      </Parsing>
     23      <CodeGeneration>
     24        <Optimizations>
     25          <OptimizationLevel Value="0"/>
     26        </Optimizations>
     27      </CodeGeneration>
     28      <Linking>
     29        <Debugging>
     30          <GenerateDebugInfo Value="False"/>
     31        </Debugging>
     32      </Linking>
    1433      <Other>
    15         <CompilerPath Value="$(CompPath)"/>
     34        <CompilerMessages>
     35          <IgnoredMessages idx5024="True"/>
     36        </CompilerMessages>
    1637      </Other>
    1738    </CompilerOptions>
    1839    <Description Value="Contains various streaming classes."/>
    1940    <License Value="GNU/GPL"/>
    20     <Version Minor="1"/>
     41    <Version Minor="2"/>
    2142    <Files Count="7">
    2243      <Item1>
    23         <Filename Value="UStreamHelper.pas"/>
    24         <UnitName Value="UStreamHelper"/>
     44        <Filename Value="StreamHelper.pas"/>
     45        <UnitName Value="StreamHelper"/>
    2546      </Item1>
    2647      <Item2>
    27         <Filename Value="USubStream.pas"/>
    28         <UnitName Value="USubStream"/>
     48        <Filename Value="SubStream.pas"/>
     49        <UnitName Value="SubStream"/>
    2950      </Item2>
    3051      <Item3>
    31         <Filename Value="UVarBlockSerializer.pas"/>
    32         <UnitName Value="UVarBlockSerializer"/>
     52        <Filename Value="VarBlockSerializer.pas"/>
     53        <UnitName Value="VarBlockSerializer"/>
    3354      </Item3>
    3455      <Item4>
    35         <Filename Value="UBufferedFileStream.pas"/>
    36         <UnitName Value="UBufferedFileStream"/>
     56        <Filename Value="BufferedFileStream.pas"/>
     57        <UnitName Value="BufferedFileStream"/>
    3758      </Item4>
    3859      <Item5>
    39         <Filename Value="UTextFileStream.pas"/>
    40         <UnitName Value="UTextFileStream"/>
     60        <Filename Value="TextFileStream.pas"/>
     61        <UnitName Value="TextFileStream"/>
    4162      </Item5>
    4263      <Item6>
    43         <Filename Value="UBitStream.pas"/>
    44         <UnitName Value="UBitStream"/>
     64        <Filename Value="BitStream.pas"/>
     65        <UnitName Value="BitStream"/>
    4566      </Item6>
    4667      <Item7>
    47         <Filename Value="UDynNumber.pas"/>
    48         <UnitName Value="UDynNumber"/>
     68        <Filename Value="DynNumber.pas"/>
     69        <UnitName Value="DynNumber"/>
    4970      </Item7>
    5071    </Files>
    51     <Type Value="RunAndDesignTime"/>
    52     <RequiredPkgs Count="2">
     72    <CompatibilityMode Value="True"/>
     73    <i18n>
     74      <EnableI18N Value="True"/>
     75      <OutDir Value="Languages"/>
     76    </i18n>
     77    <RequiredPkgs Count="3">
    5378      <Item1>
    54         <PackageName Value="Common"/>
     79        <PackageName Value="TemplateGenerics"/>
    5580      </Item1>
    5681      <Item2>
     82        <PackageName Value="Common"/>
     83      </Item2>
     84      <Item3>
    5785        <PackageName Value="FCL"/>
    5886        <MinVersion Major="1" Valid="True"/>
    59       </Item2>
     87      </Item3>
    6088    </RequiredPkgs>
    6189    <UsageOptions>
  • CoolStreaming/CoolStreaming.pas

    r125 r572  
    33 }
    44
    5 unit CoolStreaming; 
     5unit CoolStreaming;
    66
    77interface
    88
    99uses
    10     UStreamHelper, USubStream, UVarBlockSerializer, UBufferedFileStream,
    11   UTextFileStream, UBitStream, UDynNumber, LazarusPackageIntf;
     10  StreamHelper, SubStream, VarBlockSerializer, BufferedFileStream,
     11  TextFileStream, BitStream, DynNumber, LazarusPackageIntf;
    1212
    1313implementation
    1414
    15 procedure Register; 
     15procedure Register;
    1616begin
    17 end; 
     17end;
    1818
    1919initialization
    20   RegisterPackage('CoolStreaming', @Register); 
     20  RegisterPackage('CoolStreaming', @Register);
    2121end.
  • CoolStreaming/Demo/BitStream/BitStreamTest.lpi

    r249 r572  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="9"/>
     4    <Version Value="12"/>
    55    <PathDelim Value="\"/>
    66    <General>
    7       <MainUnit Value="0"/>
     7      <Flags>
     8        <CompatibilityMode Value="True"/>
     9      </Flags>
    810      <Title Value="BitStreamTest"/>
    911      <ResourceType Value="res"/>
    1012      <UseXPManifest Value="True"/>
    1113      <Icon Value="0"/>
    12       <ActiveWindowIndexAtStart Value="0"/>
    1314    </General>
    1415    <i18n>
     
    1819      <Language Value=""/>
    1920      <CharSet Value=""/>
    20       <StringTable ProductVersion=""/>
    2121    </VersionInfo>
    2222    <BuildModes Count="1">
     
    2525    <PublishOptions>
    2626      <Version Value="2"/>
    27       <IgnoreBinaries Value="False"/>
    28       <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
    29       <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
    3027    </PublishOptions>
    3128    <RunParams>
    32       <local>
    33         <FormatVersion Value="1"/>
    34       </local>
     29      <FormatVersion Value="2"/>
     30      <Modes Count="1">
     31        <Mode0 Name="default"/>
     32      </Modes>
    3533    </RunParams>
    3634    <RequiredPackages Count="2">
     
    4644        <Filename Value="BitStreamTest.lpr"/>
    4745        <IsPartOfProject Value="True"/>
    48         <UnitName Value="BitStreamTest"/>
    49         <EditorIndex Value="3"/>
    50         <WindowIndex Value="0"/>
    51         <TopLine Value="1"/>
     46        <EditorIndex Value="1"/>
    5247        <CursorPos X="32" Y="15"/>
    5348        <UsageCount Value="23"/>
    5449        <Loaded Value="True"/>
    55         <DefaultSyntaxHighlighter Value="Delphi"/>
    5650      </Unit0>
    5751      <Unit1>
     
    5953        <IsPartOfProject Value="True"/>
    6054        <ComponentName Value="MainForm"/>
     55        <HasResources Value="True"/>
    6156        <ResourceBaseClass Value="Form"/>
    62         <UnitName Value="UMainForm"/>
    63         <EditorIndex Value="0"/>
    64         <WindowIndex Value="0"/>
    65         <TopLine Value="123"/>
    66         <CursorPos X="25" Y="138"/>
     57        <IsVisibleTab Value="True"/>
     58        <CursorPos X="46" Y="30"/>
    6759        <UsageCount Value="23"/>
    6860        <Loaded Value="True"/>
    6961        <LoadedDesigner Value="True"/>
    70         <DefaultSyntaxHighlighter Value="Delphi"/>
    7162      </Unit1>
    7263      <Unit2>
    7364        <Filename Value="UBitStream.pas"/>
    74         <UnitName Value="UBitStream"/>
    75         <WindowIndex Value="0"/>
    7665        <TopLine Value="202"/>
    7766        <CursorPos X="9" Y="221"/>
     
    8271        <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/>
    8372        <UnitName Value="Controls"/>
    84         <WindowIndex Value="0"/>
    8573        <TopLine Value="1207"/>
    8674        <CursorPos X="14" Y="1220"/>
     
    8977      <Unit4>
    9078        <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\math.pp"/>
    91         <UnitName Value="math"/>
    92         <WindowIndex Value="0"/>
    9379        <TopLine Value="929"/>
    9480        <CursorPos X="5" Y="932"/>
     
    9783      <Unit5>
    9884        <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\sysutils\sysutilh.inc"/>
    99         <WindowIndex Value="0"/>
    10085        <TopLine Value="84"/>
    10186        <CursorPos X="79" Y="89"/>
     
    10489      <Unit6>
    10590        <Filename Value="..\..\UBitStream.pas"/>
    106         <UnitName Value="UBitStream"/>
    107         <IsVisibleTab Value="True"/>
    108         <EditorIndex Value="1"/>
    109         <WindowIndex Value="0"/>
     91        <EditorIndex Value="-1"/>
    11092        <TopLine Value="244"/>
    11193        <CursorPos X="7" Y="263"/>
    11294        <UsageCount Value="11"/>
    113         <Loaded Value="True"/>
    11495      </Unit6>
    11596      <Unit7>
    11697        <Filename Value="H:\0.9.30_2.4.2\fpc\2.4.2\source\rtl\objpas\classes\classesh.inc"/>
    117         <EditorIndex Value="2"/>
    118         <WindowIndex Value="0"/>
     98        <EditorIndex Value="-1"/>
    11999        <TopLine Value="779"/>
    120100        <CursorPos X="14" Y="792"/>
    121101        <UsageCount Value="11"/>
    122         <Loaded Value="True"/>
    123102      </Unit7>
    124103    </Units>
    125     <JumpHistory Count="30" HistoryIndex="29">
     104    <JumpHistory Count="6" HistoryIndex="5">
    126105      <Position1>
    127         <Filename Value="..\..\UBitStream.pas"/>
    128         <Caret Line="293" Column="1" TopLine="275"/>
     106        <Filename Value="UMainForm.pas"/>
     107        <Caret Line="183" TopLine="169"/>
    129108      </Position1>
    130109      <Position2>
    131         <Filename Value="..\..\UBitStream.pas"/>
    132         <Caret Line="294" Column="1" TopLine="275"/>
     110        <Filename Value="UMainForm.pas"/>
     111        <Caret Line="192" Column="14" TopLine="179"/>
    133112      </Position2>
    134113      <Position3>
    135         <Filename Value="..\..\UBitStream.pas"/>
    136         <Caret Line="295" Column="1" TopLine="275"/>
     114        <Filename Value="UMainForm.pas"/>
     115        <Caret Line="197" TopLine="179"/>
    137116      </Position3>
    138117      <Position4>
    139         <Filename Value="..\..\UBitStream.pas"/>
    140         <Caret Line="296" Column="1" TopLine="275"/>
     118        <Filename Value="UMainForm.pas"/>
     119        <Caret Line="190" TopLine="167"/>
    141120      </Position4>
    142121      <Position5>
    143         <Filename Value="..\..\UBitStream.pas"/>
    144         <Caret Line="297" Column="1" TopLine="276"/>
     122        <Filename Value="UMainForm.pas"/>
     123        <Caret Line="191" Column="44" TopLine="155"/>
    145124      </Position5>
    146125      <Position6>
    147         <Filename Value="..\..\UBitStream.pas"/>
    148         <Caret Line="298" Column="33" TopLine="287"/>
    149       </Position6>
    150       <Position7>
    151         <Filename Value="UMainForm.pas"/>
    152         <Caret Line="183" Column="1" TopLine="169"/>
    153       </Position7>
    154       <Position8>
    155         <Filename Value="..\..\UBitStream.pas"/>
    156         <Caret Line="288" Column="1" TopLine="283"/>
    157       </Position8>
    158       <Position9>
    159         <Filename Value="..\..\UBitStream.pas"/>
    160         <Caret Line="291" Column="1" TopLine="283"/>
    161       </Position9>
    162       <Position10>
    163         <Filename Value="..\..\UBitStream.pas"/>
    164         <Caret Line="292" Column="1" TopLine="283"/>
    165       </Position10>
    166       <Position11>
    167         <Filename Value="..\..\UBitStream.pas"/>
    168         <Caret Line="293" Column="1" TopLine="283"/>
    169       </Position11>
    170       <Position12>
    171         <Filename Value="..\..\UBitStream.pas"/>
    172         <Caret Line="294" Column="1" TopLine="283"/>
    173       </Position12>
    174       <Position13>
    175         <Filename Value="..\..\UBitStream.pas"/>
    176         <Caret Line="295" Column="1" TopLine="283"/>
    177       </Position13>
    178       <Position14>
    179         <Filename Value="..\..\UBitStream.pas"/>
    180         <Caret Line="296" Column="1" TopLine="283"/>
    181       </Position14>
    182       <Position15>
    183         <Filename Value="..\..\UBitStream.pas"/>
    184         <Caret Line="297" Column="1" TopLine="283"/>
    185       </Position15>
    186       <Position16>
    187         <Filename Value="..\..\UBitStream.pas"/>
    188         <Caret Line="298" Column="1" TopLine="283"/>
    189       </Position16>
    190       <Position17>
    191         <Filename Value="..\..\UBitStream.pas"/>
    192         <Caret Line="299" Column="1" TopLine="283"/>
    193       </Position17>
    194       <Position18>
    195         <Filename Value="..\..\UBitStream.pas"/>
    196         <Caret Line="300" Column="1" TopLine="286"/>
    197       </Position18>
    198       <Position19>
    199         <Filename Value="..\..\UBitStream.pas"/>
    200         <Caret Line="303" Column="1" TopLine="286"/>
    201       </Position19>
    202       <Position20>
    203         <Filename Value="..\..\UBitStream.pas"/>
    204         <Caret Line="306" Column="1" TopLine="286"/>
    205       </Position20>
    206       <Position21>
    207         <Filename Value="..\..\UBitStream.pas"/>
    208         <Caret Line="312" Column="1" TopLine="299"/>
    209       </Position21>
    210       <Position22>
    211         <Filename Value="..\..\UBitStream.pas"/>
    212         <Caret Line="313" Column="1" TopLine="299"/>
    213       </Position22>
    214       <Position23>
    215         <Filename Value="..\..\UBitStream.pas"/>
    216         <Caret Line="315" Column="1" TopLine="299"/>
    217       </Position23>
    218       <Position24>
    219         <Filename Value="..\..\UBitStream.pas"/>
    220         <Caret Line="316" Column="1" TopLine="299"/>
    221       </Position24>
    222       <Position25>
    223         <Filename Value="..\..\UBitStream.pas"/>
    224         <Caret Line="298" Column="14" TopLine="287"/>
    225       </Position25>
    226       <Position26>
    227         <Filename Value="UMainForm.pas"/>
    228         <Caret Line="192" Column="14" TopLine="179"/>
    229       </Position26>
    230       <Position27>
    231         <Filename Value="UMainForm.pas"/>
    232         <Caret Line="197" Column="1" TopLine="179"/>
    233       </Position27>
    234       <Position28>
    235         <Filename Value="UMainForm.pas"/>
    236         <Caret Line="190" Column="1" TopLine="167"/>
    237       </Position28>
    238       <Position29>
    239         <Filename Value="UMainForm.pas"/>
    240         <Caret Line="191" Column="44" TopLine="155"/>
    241       </Position29>
    242       <Position30>
    243126        <Filename Value="UMainForm.pas"/>
    244127        <Caret Line="138" Column="25" TopLine="123"/>
    245       </Position30>
     128      </Position6>
    246129    </JumpHistory>
    247130  </ProjectOptions>
    248131  <CompilerOptions>
    249     <Version Value="9"/>
     132    <Version Value="11"/>
    250133    <PathDelim Value="\"/>
    251134    <Target>
     
    270153    </CodeGeneration>
    271154    <Linking>
     155      <Debugging>
     156        <DebugInfoType Value="dsDwarf3"/>
     157      </Debugging>
    272158      <Options>
    273159        <Win32>
     
    276162      </Options>
    277163    </Linking>
    278     <Other>
    279       <CompilerMessages>
    280         <UseMsgFile Value="True"/>
    281       </CompilerMessages>
    282       <CompilerPath Value="$(CompPath)"/>
    283     </Other>
    284164  </CompilerOptions>
    285165  <Debugging>
  • CoolStreaming/Demo/BitStream/UMainForm.lfm

    r249 r572  
    11object MainForm: TMainForm
    22  Left = 288
    3   Height = 414
     3  Height = 621
    44  Top = 117
    5   Width = 613
     5  Width = 920
    66  Caption = 'BitStream test'
    7   ClientHeight = 414
    8   ClientWidth = 613
     7  ClientHeight = 621
     8  ClientWidth = 920
     9  DesignTimePPI = 144
    910  OnShow = FormShow
    10   LCLVersion = '0.9.30'
     11  LCLVersion = '3.4.0.0'
    1112  object Memo1: TMemo
    12     Left = 8
    13     Height = 364
    14     Top = 40
    15     Width = 599
     13    Left = 12
     14    Height = 546
     15    Top = 60
     16    Width = 899
    1617    Anchors = [akTop, akLeft, akRight, akBottom]
    1718    Font.Name = 'Courier'
     
    2122  end
    2223  object Button1: TButton
    23     Left = 9
    24     Height = 25
    25     Top = 7
    26     Width = 75
     24    Left = 14
     25    Height = 38
     26    Top = 10
     27    Width = 112
    2728    Caption = 'Base test'
     29    TabOrder = 1
    2830    OnClick = Button1Click
    29     TabOrder = 1
    3031  end
    3132  object Button2: TButton
    32     Left = 93
    33     Height = 25
    34     Top = 7
    35     Width = 75
     33    Left = 140
     34    Height = 38
     35    Top = 10
     36    Width = 112
    3637    Caption = 'Read test'
     38    TabOrder = 2
    3739    OnClick = Button2Click
    38     TabOrder = 2
    3940  end
    4041  object Button3: TButton
    41     Left = 176
    42     Height = 25
    43     Top = 7
    44     Width = 75
     42    Left = 264
     43    Height = 38
     44    Top = 10
     45    Width = 112
    4546    Caption = 'Write test'
     47    TabOrder = 3
    4648    OnClick = Button3Click
    47     TabOrder = 3
    4849  end
    4950end
  • CoolStreaming/Demo/BitStream/UMainForm.pas

    r249 r572  
    11unit UMainForm;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UBitStream;
     7  BitStream;
    108
    119type
     
    3230var
    3331  MainForm: TMainForm;
     32
    3433
    3534implementation
  • CoolStreaming/Demo/DynNumber/DynNumberDemo.lpi

    r128 r572  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="9"/>
     4    <Version Value="12"/>
    55    <PathDelim Value="\"/>
    66    <General>
    7       <MainUnit Value="0"/>
     7      <Flags>
     8        <CompatibilityMode Value="True"/>
     9      </Flags>
    810      <ResourceType Value="res"/>
    911      <UseXPManifest Value="True"/>
    1012      <Icon Value="0"/>
    11       <ActiveWindowIndexAtStart Value="0"/>
    1213    </General>
    1314    <i18n>
    1415      <EnableI18N LFM="False"/>
    1516    </i18n>
    16     <VersionInfo>
    17       <StringTable ProductVersion=""/>
    18     </VersionInfo>
    1917    <BuildModes Count="1" Active="Default">
    2018      <Item1 Name="Default" Default="True"/>
     
    2220    <PublishOptions>
    2321      <Version Value="2"/>
    24       <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
    25       <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
    2622    </PublishOptions>
    2723    <RunParams>
    28       <local>
    29         <FormatVersion Value="1"/>
    30         <LaunchingApplication PathPlusParams="\usr\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
    31       </local>
     24      <FormatVersion Value="2"/>
     25      <Modes Count="1">
     26        <Mode0 Name="default"/>
     27      </Modes>
    3228    </RunParams>
    3329    <RequiredPackages Count="2">
     
    4339        <Filename Value="DynNumberDemo.lpr"/>
    4440        <IsPartOfProject Value="True"/>
    45         <UnitName Value="DynNumberDemo"/>
    46         <WindowIndex Value="0"/>
    47         <TopLine Value="1"/>
    4841        <CursorPos X="41" Y="19"/>
    4942        <UsageCount Value="42"/>
     
    5346        <IsPartOfProject Value="True"/>
    5447        <ComponentName Value="MainForm"/>
     48        <HasResources Value="True"/>
    5549        <ResourceBaseClass Value="Form"/>
    56         <UnitName Value="UMainForm"/>
    5750        <IsVisibleTab Value="True"/>
    58         <EditorIndex Value="0"/>
    59         <WindowIndex Value="0"/>
    60         <TopLine Value="50"/>
    61         <CursorPos X="34" Y="61"/>
     51        <CursorPos X="44" Y="31"/>
    6252        <UsageCount Value="42"/>
    6353        <Loaded Value="True"/>
     
    6656      <Unit2>
    6757        <Filename Value="..\..\UDynNumber.pas"/>
    68         <UnitName Value="UDynNumber"/>
    69         <EditorIndex Value="2"/>
    70         <WindowIndex Value="0"/>
    71         <TopLine Value="1"/>
     58        <EditorIndex Value="-1"/>
    7259        <CursorPos X="17" Y="10"/>
    7360        <UsageCount Value="21"/>
    74         <Loaded Value="True"/>
    7561      </Unit2>
    7662      <Unit3>
    7763        <Filename Value="..\..\UBitStream.pas"/>
    78         <UnitName Value="UBitStream"/>
    79         <EditorIndex Value="4"/>
    80         <WindowIndex Value="0"/>
     64        <EditorIndex Value="-1"/>
    8165        <TopLine Value="21"/>
    8266        <CursorPos X="35" Y="29"/>
    8367        <UsageCount Value="21"/>
    84         <Loaded Value="True"/>
    8568      </Unit3>
    8669      <Unit4>
    8770        <Filename Value="..\..\UBufferedFileStream.pas"/>
    88         <UnitName Value="UBufferedFileStream"/>
    89         <WindowIndex Value="0"/>
    9071        <TopLine Value="38"/>
    9172        <CursorPos X="30" Y="54"/>
     
    9374      </Unit4>
    9475      <Unit5>
    95         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\classes\classesh.inc"/>
    96         <EditorIndex Value="3"/>
    97         <WindowIndex Value="0"/>
     76        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\classes\classesh.inc"/>
     77        <EditorIndex Value="-1"/>
    9878        <TopLine Value="773"/>
    9979        <CursorPos X="17" Y="789"/>
    10080        <UsageCount Value="21"/>
    101         <Loaded Value="True"/>
    10281      </Unit5>
    10382      <Unit6>
    104         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\classes\streams.inc"/>
    105         <WindowIndex Value="0"/>
     83        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\classes\streams.inc"/>
    10684        <TopLine Value="462"/>
    10785        <CursorPos X="19" Y="467"/>
     
    10987      </Unit6>
    11088      <Unit7>
    111         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\sysutils\filutilh.inc"/>
    112         <WindowIndex Value="0"/>
     89        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\sysutils\filutilh.inc"/>
    11390        <TopLine Value="60"/>
    11491        <CursorPos X="10" Y="75"/>
     
    11693      </Unit7>
    11794      <Unit8>
    118         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\sysutils.pp"/>
    119         <UnitName Value="sysutils"/>
    120         <WindowIndex Value="0"/>
     95        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\sysutils.pp"/>
    12196        <TopLine Value="435"/>
    12297        <CursorPos X="49" Y="435"/>
     
    12499      </Unit8>
    125100      <Unit9>
    126         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\bunxovlh.inc"/>
    127         <WindowIndex Value="0"/>
     101        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\bunxovlh.inc"/>
    128102        <TopLine Value="16"/>
    129103        <CursorPos X="60" Y="32"/>
     
    131105      </Unit9>
    132106      <Unit10>
    133         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\aliasptp.inc"/>
    134         <WindowIndex Value="0"/>
     107        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\aliasptp.inc"/>
    135108        <TopLine Value="16"/>
    136109        <CursorPos X="27" Y="32"/>
     
    138111      </Unit10>
    139112      <Unit11>
    140         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\linux\ptypes.inc"/>
    141         <WindowIndex Value="0"/>
     113        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\linux\ptypes.inc"/>
    142114        <TopLine Value="41"/>
    143115        <CursorPos X="22" Y="57"/>
     
    145117      </Unit11>
    146118      <Unit12>
    147         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\ctypes.inc"/>
    148         <WindowIndex Value="0"/>
     119        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\unix\ctypes.inc"/>
    149120        <TopLine Value="21"/>
    150121        <CursorPos X="3" Y="37"/>
     
    152123      </Unit12>
    153124      <Unit13>
    154         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\math.pp"/>
    155         <UnitName Value="math"/>
    156         <WindowIndex Value="0"/>
     125        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\objpas\math.pp"/>
    157126        <TopLine Value="308"/>
    158127        <CursorPos X="10" Y="324"/>
     
    160129      </Unit13>
    161130      <Unit14>
    162         <Filename Value="..\..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\inc\mathh.inc"/>
    163         <WindowIndex Value="0"/>
     131        <Filename Value="..\..\..\..\..\..\..\usr\share\fpcsrc\2.4.0\rtl\inc\mathh.inc"/>
    164132        <TopLine Value="62"/>
    165133        <CursorPos X="14" Y="78"/>
     
    168136      <Unit15>
    169137        <Filename Value="..\..\..\..\..\lazarus\lcl\include\control.inc"/>
    170         <EditorIndex Value="1"/>
    171         <WindowIndex Value="0"/>
     138        <EditorIndex Value="-1"/>
    172139        <TopLine Value="2784"/>
    173         <CursorPos X="1" Y="2808"/>
     140        <CursorPos Y="2808"/>
    174141        <UsageCount Value="10"/>
    175         <Loaded Value="True"/>
    176142      </Unit15>
    177143    </Units>
    178     <JumpHistory Count="30" HistoryIndex="29">
    179       <Position1>
    180         <Filename Value="..\..\UDynNumber.pas"/>
    181         <Caret Line="47" Column="1" TopLine="31"/>
    182       </Position1>
    183       <Position2>
    184         <Filename Value="..\..\UDynNumber.pas"/>
    185         <Caret Line="48" Column="1" TopLine="31"/>
    186       </Position2>
    187       <Position3>
    188         <Filename Value="..\..\UDynNumber.pas"/>
    189         <Caret Line="49" Column="1" TopLine="31"/>
    190       </Position3>
    191       <Position4>
    192         <Filename Value="..\..\UDynNumber.pas"/>
    193         <Caret Line="60" Column="1" TopLine="43"/>
    194       </Position4>
    195       <Position5>
    196         <Filename Value="..\..\UDynNumber.pas"/>
    197         <Caret Line="61" Column="1" TopLine="43"/>
    198       </Position5>
    199       <Position6>
    200         <Filename Value="..\..\UDynNumber.pas"/>
    201         <Caret Line="62" Column="1" TopLine="43"/>
    202       </Position6>
    203       <Position7>
    204         <Filename Value="..\..\UDynNumber.pas"/>
    205         <Caret Line="64" Column="1" TopLine="43"/>
    206       </Position7>
    207       <Position8>
    208         <Filename Value="..\..\UDynNumber.pas"/>
    209         <Caret Line="65" Column="1" TopLine="43"/>
    210       </Position8>
    211       <Position9>
    212         <Filename Value="..\..\UDynNumber.pas"/>
    213         <Caret Line="66" Column="1" TopLine="43"/>
    214       </Position9>
    215       <Position10>
    216         <Filename Value="..\..\UDynNumber.pas"/>
    217         <Caret Line="67" Column="1" TopLine="43"/>
    218       </Position10>
    219       <Position11>
    220         <Filename Value="..\..\UDynNumber.pas"/>
    221         <Caret Line="50" Column="1" TopLine="43"/>
    222       </Position11>
    223       <Position12>
    224         <Filename Value="..\..\UDynNumber.pas"/>
    225         <Caret Line="51" Column="1" TopLine="43"/>
    226       </Position12>
    227       <Position13>
    228         <Filename Value="..\..\UDynNumber.pas"/>
    229         <Caret Line="52" Column="1" TopLine="43"/>
    230       </Position13>
    231       <Position14>
    232         <Filename Value="..\..\UDynNumber.pas"/>
    233         <Caret Line="53" Column="2" TopLine="40"/>
    234       </Position14>
    235       <Position15>
    236         <Filename Value="..\..\UDynNumber.pas"/>
    237         <Caret Line="47" Column="1" TopLine="40"/>
    238       </Position15>
    239       <Position16>
    240         <Filename Value="..\..\UDynNumber.pas"/>
    241         <Caret Line="48" Column="1" TopLine="40"/>
    242       </Position16>
    243       <Position17>
    244         <Filename Value="..\..\UDynNumber.pas"/>
    245         <Caret Line="49" Column="1" TopLine="40"/>
    246       </Position17>
    247       <Position18>
    248         <Filename Value="..\..\UDynNumber.pas"/>
    249         <Caret Line="60" Column="1" TopLine="40"/>
    250       </Position18>
    251       <Position19>
    252         <Filename Value="..\..\UDynNumber.pas"/>
    253         <Caret Line="61" Column="1" TopLine="40"/>
    254       </Position19>
    255       <Position20>
    256         <Filename Value="..\..\UDynNumber.pas"/>
    257         <Caret Line="62" Column="1" TopLine="40"/>
    258       </Position20>
    259       <Position21>
    260         <Filename Value="..\..\UDynNumber.pas"/>
    261         <Caret Line="64" Column="1" TopLine="40"/>
    262       </Position21>
    263       <Position22>
    264         <Filename Value="..\..\UDynNumber.pas"/>
    265         <Caret Line="65" Column="1" TopLine="40"/>
    266       </Position22>
    267       <Position23>
    268         <Filename Value="..\..\UDynNumber.pas"/>
    269         <Caret Line="66" Column="1" TopLine="40"/>
    270       </Position23>
    271       <Position24>
    272         <Filename Value="..\..\UDynNumber.pas"/>
    273         <Caret Line="67" Column="1" TopLine="40"/>
    274       </Position24>
    275       <Position25>
    276         <Filename Value="..\..\UDynNumber.pas"/>
    277         <Caret Line="50" Column="1" TopLine="40"/>
    278       </Position25>
    279       <Position26>
    280         <Filename Value="..\..\UDynNumber.pas"/>
    281         <Caret Line="51" Column="1" TopLine="40"/>
    282       </Position26>
    283       <Position27>
    284         <Filename Value="..\..\UDynNumber.pas"/>
    285         <Caret Line="65" Column="30" TopLine="39"/>
    286       </Position27>
    287       <Position28>
    288         <Filename Value="..\..\UBitStream.pas"/>
    289         <Caret Line="162" Column="5" TopLine="150"/>
    290       </Position28>
    291       <Position29>
    292         <Filename Value="..\..\UBitStream.pas"/>
    293         <Caret Line="163" Column="31" TopLine="150"/>
    294       </Position29>
    295       <Position30>
    296         <Filename Value="..\..\UBitStream.pas"/>
    297         <Caret Line="161" Column="14" TopLine="146"/>
    298       </Position30>
    299     </JumpHistory>
     144    <JumpHistory HistoryIndex="-1"/>
    300145  </ProjectOptions>
    301146  <CompilerOptions>
    302     <Version Value="9"/>
     147    <Version Value="11"/>
    303148    <PathDelim Value="\"/>
    304149    <Target>
     
    309154      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    310155    </SearchPaths>
     156    <Parsing>
     157      <SyntaxOptions>
     158        <SyntaxMode Value="Delphi"/>
     159      </SyntaxOptions>
     160    </Parsing>
    311161    <CodeGeneration>
    312162      <Checks>
     
    319169    <Linking>
    320170      <Debugging>
     171        <DebugInfoType Value="dsDwarf3"/>
    321172        <UseHeaptrc Value="True"/>
    322173      </Debugging>
     
    327178      </Options>
    328179    </Linking>
    329     <Other>
    330       <CompilerMessages>
    331         <UseMsgFile Value="True"/>
    332       </CompilerMessages>
    333       <CompilerPath Value="$(CompPath)"/>
    334     </Other>
    335180  </CompilerOptions>
    336181  <Debugging>
  • CoolStreaming/Demo/DynNumber/DynNumberDemo.lpr

    r126 r572  
    2020  SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
    2121
     22  Application.Title:='';
    2223  Application.Initialize;
    2324  Application.CreateForm(TMainForm, MainForm);
  • CoolStreaming/Demo/DynNumber/UMainForm.lfm

    r128 r572  
    11object MainForm: TMainForm
    22  Left = 321
    3   Height = 495
     3  Height = 742
    44  Top = 114
    5   Width = 669
     5  Width = 1004
    66  Caption = 'DynNumber Demo'
    7   ClientHeight = 495
    8   ClientWidth = 669
     7  ClientHeight = 742
     8  ClientWidth = 1004
     9  DesignTimePPI = 144
    910  OnCreate = FormCreate
    1011  OnDestroy = FormDestroy
    11   LCLVersion = '0.9.31'
     12  LCLVersion = '3.4.0.0'
    1213  object PageControl1: TPageControl
    13     Left = 8
    14     Height = 480
    15     Top = 8
    16     Width = 656
     14    Left = 12
     15    Height = 720
     16    Top = 12
     17    Width = 984
    1718    ActivePage = TabSheet2
    1819    Anchors = [akTop, akLeft, akRight, akBottom]
     
    2122    object TabSheet1: TTabSheet
    2223      Caption = 'Generator'
    23       ClientHeight = 449
    24       ClientWidth = 652
     24      ClientHeight = 680
     25      ClientWidth = 974
    2526      object Button1: TButton
    26         Left = 11
    27         Height = 25
    28         Top = 10
    29         Width = 75
     27        Left = 16
     28        Height = 38
     29        Top = 15
     30        Width = 112
    3031        Caption = 'Generate'
     32        TabOrder = 0
    3133        OnClick = Button1Click
    32         TabOrder = 0
    3334      end
    3435      object Button2: TButton
    35         Left = 374
    36         Height = 25
    37         Top = 11
    38         Width = 75
     36        Left = 561
     37        Height = 38
     38        Top = 16
     39        Width = 112
    3940        Caption = 'test'
     41        TabOrder = 1
    4042        OnClick = Button2Click
    41         TabOrder = 1
    4243      end
    4344      object SpinEdit1: TSpinEdit
    44         Left = 99
    45         Height = 25
    46         Top = 10
    47         Width = 106
     45        Left = 148
     46        Height = 43
     47        Top = 15
     48        Width = 159
    4849        MaxValue = 100000000
    4950        TabOrder = 2
     
    5152      end
    5253      object ListView1: TListView
    53         Left = 11
    54         Height = 400
    55         Top = 43
    56         Width = 635
     54        Left = 16
     55        Height = 607
     56        Top = 64
     57        Width = 949
    5758        Anchors = [akTop, akLeft, akRight, akBottom]
    5859        Columns = <       
    5960          item
    6061            Caption = 'Number'
    61             Width = 70
     62            Width = 105
    6263          end       
    6364          item
    6465            Caption = 'Overhead'
    65             Width = 70
     66            Width = 105
    6667          end       
    6768          item
    6869            Caption = 'Value'
    69             Width = 494
     70            Width = 741
    7071          end>
    7172        TabOrder = 3
     
    7576    object TabSheet2: TTabSheet
    7677      Caption = 'Encoder'
    77       ClientHeight = 449
    78       ClientWidth = 652
     78      ClientHeight = 680
     79      ClientWidth = 974
    7980      object Edit1: TEdit
    80         Left = 8
    81         Height = 25
    82         Top = 8
    83         Width = 638
     81        Left = 12
     82        Height = 43
     83        Top = 12
     84        Width = 953
    8485        Anchors = [akTop, akLeft, akRight]
    8586        TabOrder = 0
     
    8788      end
    8889      object Button3: TButton
    89         Left = 8
    90         Height = 25
    91         Top = 42
    92         Width = 142
     90        Left = 12
     91        Height = 38
     92        Top = 63
     93        Width = 213
    9394        Caption = 'Encode'
     95        TabOrder = 1
    9496        OnClick = Button3Click
    95         TabOrder = 1
    9697      end
    9798      object Edit2: TEdit
    98         Left = 6
    99         Height = 25
    100         Top = 75
    101         Width = 638
     99        Left = 9
     100        Height = 43
     101        Top = 112
     102        Width = 953
    102103        Anchors = [akTop, akLeft, akRight]
    103104        TabOrder = 2
     
    105106      end
    106107      object Button4: TButton
    107         Left = 8
    108         Height = 25
    109         Top = 107
    110         Width = 142
     108        Left = 12
     109        Height = 38
     110        Top = 160
     111        Width = 213
    111112        Caption = 'Decode'
     113        TabOrder = 3
    112114        OnClick = Button4Click
    113         TabOrder = 3
    114115      end
    115116    end
    116117  end
    117118  object Edit3: TEdit
    118     Left = 16
    119     Height = 25
    120     Top = 176
    121     Width = 638
     119    Left = 24
     120    Height = 43
     121    Top = 264
     122    Width = 958
    122123    Anchors = [akTop, akLeft, akRight]
    123124    TabOrder = 1
  • CoolStreaming/Demo/DynNumber/UMainForm.pas

    r128 r572  
    11unit UMainForm;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, Spin, UDynNumber, Math;
     7  ComCtrls, Spin, DynNumber, Math;
    108
    119type
  • CoolStreaming/Demo/VarBlockSerializer/UMainForm.lfm

    r174 r572  
    11object MainForm: TMainForm
    22  Left = 263
    3   Height = 405
     3  Height = 608
    44  Top = 119
    5   Width = 644
     5  Width = 966
    66  Caption = 'VarBlockSerializer demo'
    7   ClientHeight = 405
    8   ClientWidth = 644
     7  ClientHeight = 608
     8  ClientWidth = 966
     9  DesignTimePPI = 144
    910  OnShow = FormShow
    10   LCLVersion = '0.9.31'
     11  LCLVersion = '3.4.0.0'
    1112  object PageControl1: TPageControl
    12     Left = 8
    13     Height = 392
    14     Top = 8
    15     Width = 632
     13    Left = 12
     14    Height = 588
     15    Top = 12
     16    Width = 948
    1617    ActivePage = TabSheet1
    1718    Anchors = [akTop, akLeft, akRight, akBottom]
     
    2021    object TabSheet1: TTabSheet
    2122      Caption = 'Simple types'
    22       ClientHeight = 366
    23       ClientWidth = 624
     23      ClientHeight = 548
     24      ClientWidth = 938
    2425      object GroupBox1: TGroupBox
    25         Left = 8
    26         Height = 64
    27         Top = 8
    28         Width = 608
     26        Left = 12
     27        Height = 96
     28        Top = 12
     29        Width = 912
    2930        Caption = 'Unsigned integer (UInt)'
    30         ClientHeight = 46
    31         ClientWidth = 604
     31        ClientHeight = 69
     32        ClientWidth = 910
    3233        TabOrder = 0
    3334        object SpinEditUInt: TSpinEdit
    34           Left = 6
    35           Height = 21
    36           Top = 8
    37           Width = 152
     35          Left = 9
     36          Height = 43
     37          Top = 12
     38          Width = 228
    3839          MaxValue = 1000000000
    3940          TabOrder = 0
     
    4142        end
    4243        object ButtonUIntEncode: TButton
    43           Left = 246
    44           Height = 25
    45           Top = 8
    46           Width = 75
    47           Caption = 'Encode >>'
     44          Left = 369
     45          Height = 38
     46          Top = 12
     47          Width = 112
     48          Caption = 'Encode >>'
     49          TabOrder = 1
    4850          OnClick = ButtonUIntEncodeClick
    49           TabOrder = 1
    5051        end
    5152        object EditUInt: TEdit
    52           Left = 326
    53           Height = 21
    54           Top = 8
    55           Width = 269
     53          Left = 489
     54          Height = 43
     55          Top = 12
     56          Width = 404
    5657          TabOrder = 2
    5758          Text = '00'
    5859        end
    5960        object ButtonUIntDecode: TButton
    60           Left = 166
    61           Height = 25
    62           Top = 8
    63           Width = 75
    64           Caption = '<< Decode'
     61          Left = 249
     62          Height = 38
     63          Top = 12
     64          Width = 112
     65          Caption = '<< Decode'
     66          TabOrder = 3
    6567          OnClick = ButtonUIntDecodeClick
    66           TabOrder = 3
    6768        end
    6869      end
    6970      object GroupBox2: TGroupBox
    70         Left = 8
    71         Height = 64
    72         Top = 80
    73         Width = 608
     71        Left = 12
     72        Height = 96
     73        Top = 120
     74        Width = 912
    7475        Caption = 'Signed integer (SInt)'
    75         ClientHeight = 46
    76         ClientWidth = 604
     76        ClientHeight = 69
     77        ClientWidth = 910
    7778        TabOrder = 1
    7879        object SpinEditSInt: TSpinEdit
    79           Left = 6
    80           Height = 21
    81           Top = 8
    82           Width = 152
     80          Left = 9
     81          Height = 43
     82          Top = 12
     83          Width = 228
    8384          MaxValue = 1000000000
    8485          MinValue = -1000000000
     
    8788        end
    8889        object ButtonSIntEncode: TButton
    89           Left = 246
    90           Height = 25
    91           Top = 8
    92           Width = 75
    93           Caption = 'Encode >>'
     90          Left = 369
     91          Height = 38
     92          Top = 12
     93          Width = 112
     94          Caption = 'Encode >>'
     95          TabOrder = 1
    9496          OnClick = ButtonSIntEncodeClick
    95           TabOrder = 1
    9697        end
    9798        object EditSInt: TEdit
    98           Left = 326
    99           Height = 21
    100           Top = 8
    101           Width = 269
     99          Left = 489
     100          Height = 43
     101          Top = 12
     102          Width = 404
    102103          TabOrder = 2
    103104          Text = '00'
    104105        end
    105106        object ButtonSIntDecode: TButton
    106           Left = 166
    107           Height = 25
    108           Top = 8
    109           Width = 75
    110           Caption = '<< Decode'
     107          Left = 249
     108          Height = 38
     109          Top = 12
     110          Width = 112
     111          Caption = '<< Decode'
     112          TabOrder = 3
    111113          OnClick = ButtonSIntDecodeClick
    112           TabOrder = 3
    113114        end
    114115      end
    115116      object GroupBox3: TGroupBox
    116         Left = 8
    117         Height = 64
    118         Top = 152
    119         Width = 608
     117        Left = 12
     118        Height = 96
     119        Top = 228
     120        Width = 912
    120121        Caption = 'String'
    121         ClientHeight = 46
    122         ClientWidth = 604
     122        ClientHeight = 69
     123        ClientWidth = 910
    123124        TabOrder = 2
    124125        object ButtonEncodeString: TButton
    125           Left = 246
    126           Height = 25
    127           Top = 8
    128           Width = 75
    129           Caption = 'Encode >>'
     126          Left = 369
     127          Height = 38
     128          Top = 12
     129          Width = 112
     130          Caption = 'Encode >>'
     131          TabOrder = 0
    130132          OnClick = ButtonEncodeStringClick
    131           TabOrder = 0
    132133        end
    133134        object EditStringData: TEdit
    134           Left = 326
    135           Height = 21
    136           Top = 8
    137           Width = 269
     135          Left = 489
     136          Height = 43
     137          Top = 12
     138          Width = 404
    138139          TabOrder = 1
    139140          Text = '00'
    140141        end
    141142        object ButtonDecodeString: TButton
    142           Left = 166
    143           Height = 25
    144           Top = 8
    145           Width = 75
    146           Caption = '<< Decode'
     143          Left = 249
     144          Height = 38
     145          Top = 12
     146          Width = 112
     147          Caption = '<< Decode'
     148          TabOrder = 2
    147149          OnClick = ButtonDecodeStringClick
    148           TabOrder = 2
    149150        end
    150151        object EditString: TEdit
    151           Left = 6
    152           Height = 21
    153           Top = 8
    154           Width = 152
     152          Left = 9
     153          Height = 43
     154          Top = 12
     155          Width = 228
    155156          TabOrder = 3
    156157          Text = 'Hello world'
     
    158159      end
    159160      object GroupBox4: TGroupBox
    160         Left = 8
    161         Height = 64
    162         Top = 224
    163         Width = 608
     161        Left = 12
     162        Height = 96
     163        Top = 336
     164        Width = 912
    164165        Caption = 'Raw data (Block)'
    165         ClientHeight = 46
    166         ClientWidth = 604
     166        ClientHeight = 69
     167        ClientWidth = 910
    167168        TabOrder = 3
    168169        object ButtonEncodeRaw: TButton
    169           Left = 246
    170           Height = 25
    171           Top = 8
    172           Width = 75
    173           Caption = 'Encode >>'
     170          Left = 369
     171          Height = 38
     172          Top = 12
     173          Width = 112
     174          Caption = 'Encode >>'
     175          TabOrder = 0
    174176          OnClick = ButtonEncodeRawClick
    175           TabOrder = 0
    176177        end
    177178        object EditRawData: TEdit
    178           Left = 326
    179           Height = 21
    180           Top = 8
    181           Width = 269
     179          Left = 489
     180          Height = 43
     181          Top = 12
     182          Width = 404
    182183          TabOrder = 1
    183184          Text = '00'
    184185        end
    185186        object ButtonDecodeRaw: TButton
    186           Left = 166
    187           Height = 25
    188           Top = 8
    189           Width = 75
    190           Caption = '<< Decode'
     187          Left = 249
     188          Height = 38
     189          Top = 12
     190          Width = 112
     191          Caption = '<< Decode'
     192          TabOrder = 2
    191193          OnClick = ButtonDecodeRawClick
    192           TabOrder = 2
    193194        end
    194195        object EditRaw: TEdit
    195           Left = 6
    196           Height = 21
    197           Top = 8
    198           Width = 152
     196          Left = 9
     197          Height = 43
     198          Top = 12
     199          Width = 228
    199200          TabOrder = 3
    200201          Text = '01 23 45 67 89 AB CD EF'
     
    202203      end
    203204      object GroupBox5: TGroupBox
    204         Left = 8
    205         Height = 64
    206         Top = 296
    207         Width = 608
     205        Left = 12
     206        Height = 96
     207        Top = 444
     208        Width = 912
    208209        Caption = 'Float'
    209         ClientHeight = 46
    210         ClientWidth = 604
     210        ClientHeight = 69
     211        ClientWidth = 910
    211212        TabOrder = 4
    212213        object ButtonFloatEncode1: TButton
    213           Left = 246
    214           Height = 25
    215           Top = 8
    216           Width = 75
    217           Caption = 'Encode >>'
     214          Left = 369
     215          Height = 38
     216          Top = 12
     217          Width = 112
     218          Caption = 'Encode >>'
     219          TabOrder = 0
    218220          OnClick = ButtonFloatEncode1Click
    219           TabOrder = 0
    220221        end
    221222        object EditFloat: TEdit
    222           Left = 326
    223           Height = 21
    224           Top = 8
    225           Width = 269
     223          Left = 489
     224          Height = 43
     225          Top = 12
     226          Width = 404
    226227          TabOrder = 1
    227228          Text = '00'
    228229        end
    229230        object ButtonFloatDecode1: TButton
    230           Left = 166
    231           Height = 25
    232           Top = 7
    233           Width = 75
    234           Caption = '<< Decode'
     231          Left = 249
     232          Height = 38
     233          Top = 10
     234          Width = 112
     235          Caption = '<< Decode'
     236          TabOrder = 2
    235237          OnClick = ButtonFloatDecode1Click
    236           TabOrder = 2
    237238        end
    238239        object FloatSpinEdit1: TFloatSpinEdit
    239           Left = 6
    240           Height = 21
    241           Top = 7
    242           Width = 96
     240          Left = 9
     241          Height = 43
     242          Top = 10
     243          Width = 144
    243244          DecimalPlaces = 8
    244           Increment = 1
    245245          MaxValue = 1000000000
    246246          MinValue = -100000000
    247247          TabOrder = 3
    248           Value = 0
    249248        end
    250249        object SpinEditFloat: TSpinEdit
    251           Left = 110
    252           Height = 21
    253           Top = 16
    254           Width = 50
     250          Left = 165
     251          Height = 43
     252          Top = 24
     253          Width = 75
    255254          MaxValue = 16
    256255          MinValue = 2
     
    259258        end
    260259        object Label1: TLabel
    261           Left = 111
    262           Height = 14
     260          Left = 166
     261          Height = 26
    263262          Top = 0
    264           Width = 24
     263          Width = 41
    265264          Caption = 'Base'
    266265          ParentColor = False
     
    270269    object TabSheet2: TTabSheet
    271270      Caption = 'Indexed structure'
    272       ClientHeight = 366
    273       ClientWidth = 624
     271      ClientHeight = 548
     272      ClientWidth = 938
    274273      object EditIndexedItem1: TEdit
    275         Left = 36
    276         Height = 21
    277         Top = 34
    278         Width = 224
     274        Left = 54
     275        Height = 43
     276        Top = 51
     277        Width = 336
    279278        TabOrder = 0
    280279        Text = '11 22'
    281280      end
    282281      object Label2: TLabel
    283         Left = 10
    284         Height = 14
    285         Top = 38
    286         Width = 14
     282        Left = 15
     283        Height = 26
     284        Top = 57
     285        Width = 20
    287286        Caption = '0: '
    288287        ParentColor = False
    289288      end
    290289      object Label3: TLabel
    291         Left = 10
    292         Height = 14
    293         Top = 61
    294         Width = 11
     290        Left = 15
     291        Height = 26
     292        Top = 92
     293        Width = 15
    295294        Caption = '1:'
    296295        ParentColor = False
    297296      end
    298297      object EditIndexedItem2: TEdit
    299         Left = 36
    300         Height = 21
    301         Top = 58
    302         Width = 224
     298        Left = 54
     299        Height = 43
     300        Top = 87
     301        Width = 336
    303302        TabOrder = 1
    304303        Text = '33 44'
    305304      end
    306305      object EditIndexedItem3: TEdit
    307         Left = 36
    308         Height = 21
    309         Top = 86
    310         Width = 224
     306        Left = 54
     307        Height = 43
     308        Top = 129
     309        Width = 336
    311310        TabOrder = 2
    312311        Text = '55 66'
    313312      end
    314313      object Label4: TLabel
    315         Left = 10
    316         Height = 14
    317         Top = 89
    318         Width = 11
     314        Left = 15
     315        Height = 26
     316        Top = 134
     317        Width = 15
    319318        Caption = '2:'
    320319        ParentColor = False
    321320      end
    322321      object ButtonEncodeIndexed: TButton
    323         Left = 156
    324         Height = 25
    325         Top = 122
    326         Width = 75
     322        Left = 234
     323        Height = 38
     324        Top = 183
     325        Width = 112
    327326        Caption = 'Encode >>'
     327        TabOrder = 3
    328328        OnClick = ButtonEncodeIndexedClick
    329         TabOrder = 3
    330329      end
    331330      object ButtonDecodeIndexed: TButton
    332         Left = 68
    333         Height = 25
    334         Top = 122
    335         Width = 75
     331        Left = 102
     332        Height = 38
     333        Top = 183
     334        Width = 112
    336335        Caption = '<< Decode'
     336        TabOrder = 4
    337337        OnClick = ButtonDecodeIndexedClick
    338         TabOrder = 4
    339338      end
    340339      object EditIndexed: TEdit
    341         Left = 10
    342         Height = 21
    343         Top = 154
    344         Width = 588
     340        Left = 15
     341        Height = 43
     342        Top = 231
     343        Width = 882
    345344        TabOrder = 5
    346345      end
    347346      object CheckBoxMask1: TCheckBox
    348         Left = 284
    349         Height = 17
    350         Top = 34
    351         Width = 20
     347        Left = 426
     348        Height = 23
     349        Top = 51
     350        Width = 23
    352351        Checked = True
    353352        State = cbChecked
     
    355354      end
    356355      object CheckBoxMask2: TCheckBox
    357         Left = 284
    358         Height = 17
    359         Top = 59
    360         Width = 20
     356        Left = 426
     357        Height = 23
     358        Top = 88
     359        Width = 23
    361360        Checked = True
    362361        State = cbChecked
     
    364363      end
    365364      object CheckBoxMask3: TCheckBox
    366         Left = 284
    367         Height = 17
    368         Top = 88
    369         Width = 20
     365        Left = 426
     366        Height = 23
     367        Top = 132
     368        Width = 23
    370369        Checked = True
    371370        State = cbChecked
     
    373372      end
    374373      object Label5: TLabel
    375         Left = 268
    376         Height = 14
    377         Top = 18
    378         Width = 40
     374        Left = 402
     375        Height = 26
     376        Top = 27
     377        Width = 74
    379378        Caption = 'Bit mask'
    380379        ParentColor = False
    381380      end
    382381      object Label6: TLabel
    383         Left = 8
    384         Height = 14
    385         Top = 11
    386         Width = 29
     382        Left = 12
     383        Height = 26
     384        Top = 16
     385        Width = 48
    387386        Caption = 'Index'
    388387        ParentColor = False
  • CoolStreaming/Demo/VarBlockSerializer/UMainForm.pas

    r173 r572  
    11unit UMainForm;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Spin, UVarBlockSerializer, StrUtils, ComCtrls, ExtCtrls;
     7  Spin, VarBlockSerializer, ComCtrls, ExtCtrls;
    108
    119type
  • CoolStreaming/Demo/VarBlockSerializer/VarBlockSerializerDemo.lpi

    r222 r572  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="9"/>
     4    <Version Value="12"/>
    55    <PathDelim Value="\"/>
    66    <General>
    7       <MainUnit Value="0"/>
     7      <Flags>
     8        <CompatibilityMode Value="True"/>
     9      </Flags>
    810      <Title Value="VarBlockSerializerDemo"/>
    911      <ResourceType Value="res"/>
    1012      <UseXPManifest Value="True"/>
    1113      <Icon Value="0"/>
    12       <ActiveWindowIndexAtStart Value="0"/>
    1314    </General>
    1415    <i18n>
    1516      <EnableI18N LFM="False"/>
    1617    </i18n>
    17     <VersionInfo>
    18       <StringTable ProductVersion=""/>
    19     </VersionInfo>
    2018    <BuildModes Count="1" Active="Default">
    2119      <Item1 Name="Default" Default="True"/>
     
    2321    <PublishOptions>
    2422      <Version Value="2"/>
    25       <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
    26       <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
    2723    </PublishOptions>
    2824    <RunParams>
    29       <local>
    30         <FormatVersion Value="1"/>
    31       </local>
     25      <FormatVersion Value="2"/>
     26      <Modes Count="1">
     27        <Mode0 Name="default"/>
     28      </Modes>
    3229    </RunParams>
    3330    <RequiredPackages Count="3">
     
    4744        <Filename Value="VarBlockSerializerDemo.lpr"/>
    4845        <IsPartOfProject Value="True"/>
    49         <UnitName Value="VarBlockSerializerDemo"/>
    5046        <UsageCount Value="57"/>
    5147      </Unit0>
     
    5450        <IsPartOfProject Value="True"/>
    5551        <ComponentName Value="MainForm"/>
     52        <HasResources Value="True"/>
    5653        <ResourceBaseClass Value="Form"/>
    57         <UnitName Value="UMainForm"/>
    58         <EditorIndex Value="0"/>
    59         <WindowIndex Value="0"/>
    60         <TopLine Value="221"/>
    61         <CursorPos X="1" Y="238"/>
     54        <IsVisibleTab Value="True"/>
     55        <TopLine Value="50"/>
     56        <CursorPos X="50" Y="73"/>
    6257        <UsageCount Value="57"/>
    6358        <Loaded Value="True"/>
     
    6762        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\spin.pp"/>
    6863        <UnitName Value="Spin"/>
    69         <EditorIndex Value="12"/>
    70         <WindowIndex Value="0"/>
     64        <EditorIndex Value="-1"/>
    7165        <TopLine Value="172"/>
    7266        <CursorPos X="17" Y="185"/>
    7367        <UsageCount Value="29"/>
    74         <Loaded Value="True"/>
    7568      </Unit2>
    7669      <Unit3>
    7770        <Filename Value="..\..\UVarBlockSerializer.pas"/>
    78         <UnitName Value="UVarBlockSerializer"/>
    79         <IsVisibleTab Value="True"/>
    80         <EditorIndex Value="8"/>
    81         <WindowIndex Value="0"/>
     71        <EditorIndex Value="-1"/>
    8272        <TopLine Value="218"/>
    8373        <CursorPos X="22" Y="248"/>
    8474        <UsageCount Value="29"/>
    85         <Loaded Value="True"/>
    8675      </Unit3>
    8776      <Unit4>
    8877        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/>
    89         <EditorIndex Value="10"/>
    90         <WindowIndex Value="0"/>
     78        <EditorIndex Value="-1"/>
    9179        <TopLine Value="773"/>
    9280        <CursorPos X="14" Y="786"/>
    9381        <UsageCount Value="29"/>
    94         <Loaded Value="True"/>
    9582      </Unit4>
    9683      <Unit5>
    9784        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\streams.inc"/>
    98         <EditorIndex Value="11"/>
    99         <WindowIndex Value="0"/>
     85        <EditorIndex Value="-1"/>
    10086        <TopLine Value="134"/>
    10187        <CursorPos X="26" Y="144"/>
    10288        <UsageCount Value="29"/>
    103         <Loaded Value="True"/>
    10489      </Unit5>
    10590      <Unit6>
    10691        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\control.inc"/>
    107         <EditorIndex Value="1"/>
    108         <WindowIndex Value="0"/>
     92        <EditorIndex Value="-1"/>
    10993        <TopLine Value="1672"/>
    110         <CursorPos X="1" Y="1685"/>
     94        <CursorPos Y="1685"/>
    11195        <UsageCount Value="12"/>
    112         <Loaded Value="True"/>
    11396      </Unit6>
    11497      <Unit7>
    11598        <Filename Value="..\..\UStreamHelper.pas"/>
    116         <UnitName Value="UStreamHelper"/>
    117         <EditorIndex Value="9"/>
    118         <WindowIndex Value="0"/>
     99        <EditorIndex Value="-1"/>
    119100        <TopLine Value="192"/>
    120         <CursorPos X="1" Y="205"/>
     101        <CursorPos Y="205"/>
    121102        <UsageCount Value="12"/>
    122         <Loaded Value="True"/>
    123103      </Unit7>
    124104      <Unit8>
    125105        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\inc\mathh.inc"/>
    126         <WindowIndex Value="0"/>
    127106        <TopLine Value="57"/>
    128107        <CursorPos X="18" Y="79"/>
     
    131110      <Unit9>
    132111        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\buttoncontrol.inc"/>
    133         <EditorIndex Value="6"/>
    134         <WindowIndex Value="0"/>
     112        <EditorIndex Value="-1"/>
    135113        <TopLine Value="14"/>
    136         <CursorPos X="1" Y="22"/>
    137         <UsageCount Value="11"/>
    138         <Loaded Value="True"/>
     114        <CursorPos Y="22"/>
     115        <UsageCount Value="11"/>
    139116      </Unit9>
    140117      <Unit10>
    141118        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\buttons.inc"/>
    142         <EditorIndex Value="7"/>
    143         <WindowIndex Value="0"/>
     119        <EditorIndex Value="-1"/>
    144120        <TopLine Value="320"/>
    145         <CursorPos X="1" Y="342"/>
    146         <UsageCount Value="11"/>
    147         <Loaded Value="True"/>
     121        <CursorPos Y="342"/>
     122        <UsageCount Value="11"/>
    148123      </Unit10>
    149124      <Unit11>
    150125        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/>
    151         <EditorIndex Value="2"/>
    152         <WindowIndex Value="0"/>
     126        <EditorIndex Value="-1"/>
    153127        <TopLine Value="5229"/>
    154128        <CursorPos X="38" Y="5239"/>
    155129        <UsageCount Value="11"/>
    156         <Loaded Value="True"/>
    157130      </Unit11>
    158131      <Unit12>
    159132        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclmessageglue.pas"/>
    160133        <UnitName Value="LCLMessageGlue"/>
    161         <EditorIndex Value="3"/>
    162         <WindowIndex Value="0"/>
     134        <EditorIndex Value="-1"/>
    163135        <TopLine Value="122"/>
    164         <CursorPos X="1" Y="122"/>
    165         <UsageCount Value="11"/>
    166         <Loaded Value="True"/>
     136        <CursorPos Y="122"/>
     137        <UsageCount Value="11"/>
    167138      </Unit12>
    168139      <Unit13>
    169140        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32callback.inc"/>
    170         <EditorIndex Value="4"/>
    171         <WindowIndex Value="0"/>
     141        <EditorIndex Value="-1"/>
    172142        <TopLine Value="2617"/>
    173         <CursorPos X="1" Y="2617"/>
    174         <UsageCount Value="11"/>
    175         <Loaded Value="True"/>
     143        <CursorPos Y="2617"/>
     144        <UsageCount Value="11"/>
    176145      </Unit13>
    177146      <Unit14>
    178147        <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32wsstdctrls.pp"/>
    179148        <UnitName Value="Win32WSStdCtrls"/>
    180         <EditorIndex Value="5"/>
    181         <WindowIndex Value="0"/>
     149        <EditorIndex Value="-1"/>
    182150        <TopLine Value="407"/>
    183         <CursorPos X="1" Y="407"/>
    184         <UsageCount Value="11"/>
    185         <Loaded Value="True"/>
     151        <CursorPos Y="407"/>
     152        <UsageCount Value="11"/>
    186153      </Unit14>
    187154    </Units>
    188     <JumpHistory Count="30" HistoryIndex="29">
     155    <JumpHistory Count="2" HistoryIndex="1">
    189156      <Position1>
    190         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    191         <Caret Line="244" Column="1" TopLine="236"/>
     157        <Filename Value="UMainForm.pas"/>
     158        <Caret Line="7" Column="29"/>
    192159      </Position1>
    193160      <Position2>
    194         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    195         <Caret Line="243" Column="1" TopLine="236"/>
     161        <Filename Value="UMainForm.pas"/>
     162        <Caret Line="73" Column="30" TopLine="48"/>
    196163      </Position2>
    197       <Position3>
    198         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    199         <Caret Line="244" Column="1" TopLine="236"/>
    200       </Position3>
    201       <Position4>
    202         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    203         <Caret Line="243" Column="1" TopLine="236"/>
    204       </Position4>
    205       <Position5>
    206         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    207         <Caret Line="244" Column="1" TopLine="236"/>
    208       </Position5>
    209       <Position6>
    210         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    211         <Caret Line="243" Column="1" TopLine="236"/>
    212       </Position6>
    213       <Position7>
    214         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    215         <Caret Line="244" Column="1" TopLine="236"/>
    216       </Position7>
    217       <Position8>
    218         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    219         <Caret Line="243" Column="1" TopLine="236"/>
    220       </Position8>
    221       <Position9>
    222         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    223         <Caret Line="244" Column="1" TopLine="236"/>
    224       </Position9>
    225       <Position10>
    226         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    227         <Caret Line="243" Column="1" TopLine="236"/>
    228       </Position10>
    229       <Position11>
    230         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    231         <Caret Line="244" Column="1" TopLine="236"/>
    232       </Position11>
    233       <Position12>
    234         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    235         <Caret Line="243" Column="1" TopLine="236"/>
    236       </Position12>
    237       <Position13>
    238         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    239         <Caret Line="244" Column="1" TopLine="236"/>
    240       </Position13>
    241       <Position14>
    242         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    243         <Caret Line="243" Column="1" TopLine="236"/>
    244       </Position14>
    245       <Position15>
    246         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    247         <Caret Line="244" Column="1" TopLine="236"/>
    248       </Position15>
    249       <Position16>
    250         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    251         <Caret Line="243" Column="1" TopLine="236"/>
    252       </Position16>
    253       <Position17>
    254         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    255         <Caret Line="244" Column="1" TopLine="236"/>
    256       </Position17>
    257       <Position18>
    258         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    259         <Caret Line="243" Column="1" TopLine="236"/>
    260       </Position18>
    261       <Position19>
    262         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    263         <Caret Line="244" Column="1" TopLine="236"/>
    264       </Position19>
    265       <Position20>
    266         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    267         <Caret Line="243" Column="1" TopLine="236"/>
    268       </Position20>
    269       <Position21>
    270         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    271         <Caret Line="244" Column="1" TopLine="236"/>
    272       </Position21>
    273       <Position22>
    274         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    275         <Caret Line="243" Column="1" TopLine="236"/>
    276       </Position22>
    277       <Position23>
    278         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    279         <Caret Line="244" Column="1" TopLine="236"/>
    280       </Position23>
    281       <Position24>
    282         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    283         <Caret Line="243" Column="1" TopLine="236"/>
    284       </Position24>
    285       <Position25>
    286         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    287         <Caret Line="244" Column="1" TopLine="236"/>
    288       </Position25>
    289       <Position26>
    290         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    291         <Caret Line="243" Column="1" TopLine="236"/>
    292       </Position26>
    293       <Position27>
    294         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    295         <Caret Line="244" Column="1" TopLine="236"/>
    296       </Position27>
    297       <Position28>
    298         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    299         <Caret Line="243" Column="1" TopLine="236"/>
    300       </Position28>
    301       <Position29>
    302         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    303         <Caret Line="244" Column="1" TopLine="236"/>
    304       </Position29>
    305       <Position30>
    306         <Filename Value="..\..\UVarBlockSerializer.pas"/>
    307         <Caret Line="243" Column="1" TopLine="236"/>
    308       </Position30>
    309164    </JumpHistory>
    310165  </ProjectOptions>
    311166  <CompilerOptions>
    312     <Version Value="10"/>
     167    <Version Value="11"/>
    313168    <PathDelim Value="\"/>
    314169    <Target>
     
    319174      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    320175    </SearchPaths>
     176    <Parsing>
     177      <SyntaxOptions>
     178        <SyntaxMode Value="Delphi"/>
     179      </SyntaxOptions>
     180    </Parsing>
    321181    <Linking>
     182      <Debugging>
     183        <DebugInfoType Value="dsDwarf3"/>
     184      </Debugging>
    322185      <Options>
    323186        <Win32>
     
    326189      </Options>
    327190    </Linking>
    328     <Other>
    329       <CompilerPath Value="$(CompPath)"/>
    330     </Other>
    331191  </CompilerOptions>
    332192  <Debugging>
  • CoolStreaming/DynNumber.pas

    r571 r572  
    1 unit UDynNumber;
    2 
    3 {$mode objfpc}{$H+}
     1unit DynNumber;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UBitStream, Math;
     6  Classes, SysUtils, BitStream, Math;
    97
    108type
     
    2119    function ReadNumber2: QWord;
    2220  end;
     21
    2322
    2423implementation
     
    7473destructor TDynamicNumber.Destroy;
    7574begin
    76   Stream.Free;
    77   inherited Destroy;
     75  FreeAndNil(Stream);
     76  inherited;
    7877end;
    7978
  • CoolStreaming/StreamHelper.pas

    r571 r572  
    1 unit UStreamHelper;
    2 
    3 {$mode delphi}{$H+}
     1unit StreamHelper;
    42
    53interface
     
    6866  end;
    6967
     68
    7069implementation
    7170
     
    232231destructor TStreamHelper.Destroy;
    233232begin
    234   if FOwnStream then FStream.Free;
    235   inherited Destroy;
     233  if FOwnStream then FreeAndNil(FStream);
     234  inherited;
    236235end;
    237236
  • CoolStreaming/SubStream.pas

    r571 r572  
    1 unit USubStream;
    2 
    3 {$mode delphi}
     1unit SubStream;
    42
    53interface
     
    2725    property SourcePosition: Int64 read FSourcePosition write FSourcePosition;
    2826  end;
     27
    2928
    3029implementation
  • CoolStreaming/TextFileStream.pas

    r571 r572  
    1 // TTextFileStream class by Chronos 12.9.2005
    2 // Homepage: http://jirihajda.zdechov.net/
    3 
    4 unit UTextFileStream;
    5 
    6 {$mode Delphi}{$H+}
     1unit TextFileStream;
    72
    83interface
    94
    10 uses Classes, SysUtils;
     5uses
     6  Classes, SysUtils;
    117
    128type
     
    1511  private
    1612    FBuffer: string;
    17   protected
    18 
    1913  public
    2014    function Eof: Boolean;
     
    2418    function RowsCount: Integer;
    2519  end;
     20
    2621
    2722implementation
  • CoolStreaming/VarBlockSerializer.pas

    r571 r572  
    1 // 2011-02-22
    2 
    3 unit UVarBlockSerializer;
    4 
    5 {$mode Delphi}{$H+}
     1unit VarBlockSerializer;
    62
    73// One level of recursive VarInt size supported
     
    117
    128uses
    13   Classes, DateUtils, UStreamHelper, Math, SysUtils, USubStream,
     9  Classes, DateUtils, StreamHelper, Math, SysUtils, SubStream, LazUTF8,
    1410  SpecializedList, LCLProc;
    1511
     
    119115  end;
    120116
     117
    121118implementation
    122119
     
    191188  // Get bit length
    192189  Length := SizeOf(QWord) * BitAlignment;
    193   while (((Value shr Length) and 1) = 0) and (Length > 0) do
     190  while ((Value and (QWord(1) shl (Length - 1))) = 0) and (Length > 0) do
    194191    Dec(Length);
    195192  Inc(Length);
     
    698695constructor TVarBlockSerializer.Create;
    699696begin
    700   inherited Create;
     697  inherited;
    701698  Stream := TStreamHelper.Create;
    702699  OwnsStream := True;
     
    707704begin
    708705  if OwnsStream then begin
    709     Stream.Free;
    710   end;
    711   inherited Destroy;
     706    FreeAndNil(FStream);
     707  end;
     708  inherited;
    712709end;
    713710
Note: See TracChangeset for help on using the changeset viewer.