Skip to content

Commit a55ec7d

Browse files
committed
libzstd 1.2.0 release
1 parent 18dfe55 commit a55ec7d

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BSD License
22

33
For ZstdNet software
44

5-
Copyright (c) 2016, SKB Kontur. All rights reserved.
5+
Copyright (c) 2016-2017, SKB Kontur. All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,
88
are permitted provided that the following conditions are met:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,6 @@ performance and memory overhead.
198198
Wrapper Authors
199199
---------------
200200

201-
Copyright (c) 2016 [SKB Kontur](https://kontur.ru/eng/about)
201+
Copyright (c) 2016-2017 [SKB Kontur](https://kontur.ru/eng/about)
202202

203203
*ZstdNet* is distributed under [BSD 3-Clause License](LICENSE).

ZstdNet/DictBuilder.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ public static class DictBuilder
1010
{
1111
public static byte[] TrainFromBuffer(IEnumerable<byte[]> samples, int dictCapacity = DefaultDictCapacity)
1212
{
13-
var ms = new MemoryStream ();
14-
var samplesSizes = new List<size_t> ();
15-
foreach (var sample in samples) {
16-
samplesSizes.Add ((size_t) sample.Length);
17-
ms.Write (sample, 0, sample.Length);
18-
}
19-
var samplesBuffer = ms.ToArray ();
13+
var ms = new MemoryStream();
14+
var samplesSizes = samples.Select(sample =>
15+
{
16+
ms.Write(sample, 0, sample.Length);
17+
return (size_t)sample.Length;
18+
}).ToArray();
2019

2120
var dictBuffer = new byte[dictCapacity];
2221
var dictSize = (int)ExternMethods
23-
.ZDICT_trainFromBuffer(dictBuffer, (size_t)dictCapacity, samplesBuffer, samplesSizes.ToArray(), (uint)samplesSizes.Count)
22+
.ZDICT_trainFromBuffer(dictBuffer, (size_t)dictCapacity, ms.ToArray(), samplesSizes, (uint)samplesSizes.Length)
2423
.EnsureZdictSuccess();
25-
if (dictCapacity != dictSize) {
26-
Array.Resize<byte> (ref dictBuffer, dictSize);
27-
}
24+
25+
if (dictCapacity != dictSize)
26+
Array.Resize(ref dictBuffer, dictSize);
27+
2828
return dictBuffer;
2929
}
3030

ZstdNet/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("SKB Kontur")]
1212
[assembly: AssemblyProduct("ZstdNet")]
13-
[assembly: AssemblyCopyright("Copyright © SKB Kontur 2016")]
13+
[assembly: AssemblyCopyright("Copyright © SKB Kontur 2016-2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.2.0.0")]
36+
[assembly: AssemblyFileVersion("1.2.0.0")]

ZstdNet/build/x64/libzstd.dll

1 KB
Binary file not shown.

ZstdNet/build/x86/libzstd.dll

2 KB
Binary file not shown.

0 commit comments

Comments
 (0)