Skip to content

Commit da15123

Browse files
committed
moving modules to separate repositories
1 parent 1555e24 commit da15123

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+28
-3255
lines changed

README.txt

-8
This file was deleted.

deploy/OrigoDB.Blackbox.nuspec

-26
This file was deleted.

deploy/OrigoDB.ProtoBuf.nuspec

-26
This file was deleted.

deploy/OrigoDb.Log4Net.nuspec

-26
This file was deleted.

deploy/OrigoDb.SqlStorage.nuspec

-25
This file was deleted.

src/OrigoDB.Core.Test/OrigoDB.Core.Test.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@
9494
<Project>{cc2165e7-5f7f-41e2-8a1c-28af88ba7aa1}</Project>
9595
<Name>OrigoDB.Core</Name>
9696
</ProjectReference>
97-
<ProjectReference Include="..\OrigoDB.Modules.SqlStorage\OrigoDB.Modules.SqlStorage.csproj">
98-
<Project>{0524d08d-149d-4199-89d8-df75e77d6638}</Project>
99-
<Name>OrigoDB.Modules.SqlStorage</Name>
100-
</ProjectReference>
10197
</ItemGroup>
10298
<ItemGroup>
10399
<None Include="app.config">

src/OrigoDB.Core.UnitTests/CompressorTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public IEnumerable<ICompressor> TestCases()
7373
{
7474
yield return new DeflateStreamCompressor();
7575
yield return new GzipCompressor();
76-
yield return new LzfCompressionAdapter();
76+
//yield return new LzfCompressionAdapter();
7777
}
7878

7979
private const string testData = @"Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit.

src/OrigoDB.Core/Compression/LzfCompressionAdapter.cs

-32
This file was deleted.

src/OrigoDB.Core/OrigoDB.Core.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
<Compile Include="Compression\DeflateStreamCompressor.cs" />
8686
<Compile Include="Compression\GzipCompressor.cs" />
8787
<Compile Include="Compression\ICompressor.cs" />
88-
<Compile Include="Compression\LzfCompressionAdapter.cs" />
8988
<Compile Include="Compression\StreamCompressor.cs" />
9089
<Compile Include="Configuration\ClientConfiguration.cs" />
9190
<Compile Include="Configuration\CompressionMethod.cs" />
@@ -129,6 +128,7 @@
129128
<Compile Include="Storage\ByteCountingNullStream.cs" />
130129
<Compile Include="Storage\PacketingFormatter.cs" />
131130
<Compile Include="Utilities\ByteArrayExtensions.cs" />
131+
<Compile Include="Utilities\CompressionAlgorithms.cs" />
132132
<Compile Include="Utilities\ConnectionPool.cs" />
133133
<Compile Include="Utilities\Disposable[T].cs" />
134134
<Compile Include="Linq\CachingLinqCompiler.cs" />
@@ -166,7 +166,6 @@
166166
<Compile Include="Storage\Snapshot.cs" />
167167
<Compile Include="Storage\Store.cs" />
168168
<Compile Include="Utilities\Ensure.cs" />
169-
<Compile Include="Utilities\Lzf.cs" />
170169
<Compile Include="Utilities\NonDestructiveArrayQueue.cs" />
171170
<Compile Include="Storage\Packet.cs">
172171
<SubType>Code</SubType>

src/OrigoDB.Core/Storage/Packet.cs

+15-22
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,25 @@ public enum PacketOptions : byte
1616
All = Encryted | Compressed | Checksum
1717
}
1818

19+
/// <summary>
20+
/// Container for bytes to be written to the journal, takes options when
21+
/// <remarks>
22+
/// Header format:
23+
/// 1. Byte : PacketOptions
24+
/// 2. Int32 : Number of payload bytes
25+
/// 3. Byte[] : Payload bytes
26+
/// 4. Int16 : Number of Checksum bytes. Optional, only when using Checksums
27+
/// 5. Byte[] Checksum bytes. Optional, only when using Checksums
28+
/// </remarks>
29+
/// </summary>
1930
public class Packet
2031
{
21-
/** Header is one byte in information bits(8 bools)
22-
* 0 IsEncrypted?
23-
* 1 IsCompressed?
24-
* 2 IncludeChecksum?
25-
* 3
26-
* 4
27-
* 5
28-
* 6
29-
* 7
30-
*
31-
* Next four bytes is the length of payload data in Int32 format
32-
* followed by the corresponding length of payload data.
33-
*
34-
* IF IncludeChecksum : Next four bytes is the length of checksum data in Int32 format
35-
* followed by the corresponding length of checksum data.
36-
**/
3732

3833
[ThreadStatic] private static HashAlgorithm _hasher;
34+
35+
readonly PacketOptions _options;
36+
byte[] _checksum;
37+
byte[] _bytes;
3938

4039
private static HashAlgorithm Hasher
4140
{
@@ -46,12 +45,6 @@ private static HashAlgorithm Hasher
4645
}
4746
}
4847

49-
private PacketOptions _options;
50-
private byte[] _checksum;
51-
public byte[] _bytes;
52-
53-
54-
5548
public static Packet Create(byte[] bytes, PacketOptions options = PacketOptions.Checksum)
5649
{
5750
var packet = new Packet(bytes, options);

src/OrigoDB.Core/Utilities/ByteArrayExtensions.cs

+1-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33

44
namespace OrigoDB.Core.Utilities
55
{
6-
public enum CompressionAlgorithm
7-
{
8-
Gzip,
9-
Deflate,
10-
Lz4
11-
}
12-
13-
public static class ByteArrayExtensions
6+
public static class ByteArrayExtensions
147
{
158

169
public static ICompressor CompressionAlgorithm = new DeflateStreamCompressor();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace OrigoDB.Core.Utilities
2+
{
3+
4+
public enum CompressionAlgorithm
5+
{
6+
Gzip,
7+
Deflate,
8+
Custom
9+
}
10+
}

0 commit comments

Comments
 (0)