Skip to content

Commit 84f2b09

Browse files
Merge pull request #231 from sergey-dryabzhinsky/issue-191-update-libzstd-157
Prepare to new version 1.5.7
2 parents 1dc1fb6 + 72b1002 commit 84f2b09

File tree

7 files changed

+43
-24
lines changed

7 files changed

+43
-24
lines changed

.github/workflows/Build_wheels_for_cpython312_x86_64_u24.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build wheels for CPython3.12 x64 on Ubuntu20 with GCC-9 All warnings
1+
name: Build wheels for CPython3.12 x64 on Ubuntu16 with GCC-9 All warnings
22

33
on: [push, pull_request]
44

@@ -14,12 +14,12 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os:
17-
- name: Ubuntu 24+20 amd64 CPython 3.12
17+
- name: Ubuntu 24+16 amd64 CPython 3.12
1818
runs-on: ubuntu-latest
1919
matrix: linux
2020
arch: amd64
2121
tag_arch: x86_64
22-
release: focal
22+
release: xenial
2323
mirror: http://azure.archive.ubuntu.com/ubuntu
2424
#version: 1.5.6.7
2525
# pyver: "3.7"
@@ -64,11 +64,11 @@ jobs:
6464
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/proc -t proc
6565
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/dev/pts -t devpts
6666
sudo mount none ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/sys -t sysfs
67-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list
68-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list
69-
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list
67+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/python ubuntu-${{matrix.os.release}} main" > rusoft-python.list
68+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/backports ubuntu-${{matrix.os.release}} main" > rusoft-backports.list
69+
echo " deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/packages ubuntu-${{matrix.os.release}} main" > rusoft-packages.list
7070
echo "# deb [trusted=yes] http://packages.rusoft.ru/ppa/rusoft/toolchain ubuntu-${{matrix.os.release}} main" > rusoft-toolchain.list
71-
echo " deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list
71+
echo "# deb [trusted=yes] http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${{matrix.os.release}} main" > deadsnakes.list
7272
false && sudo find ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} -iname apt
7373
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt update
7474
sudo cp -v ./*.list ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/etc/apt/sources.list.d
@@ -92,7 +92,7 @@ jobs:
9292
- name: Pepare for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
9393
if: matrix.os.matrix == 'linux'
9494
run: |
95-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y ${{matrix.os.pypkg}}-dev gcc pkg-config ${{matrix.os.pypkgadd}}
95+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /usr/bin/apt install -y ${{matrix.os.pypkg}}-dev gcc-9 pkg-config ${{matrix.os.pypkgadd}}
9696
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "wget ${{matrix.os.getpipurl}} -O get-pip.py"
9797
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "echo ${{matrix.os.pypkg}} get-pip.py --break-system-packages --root-user-action ignore"
9898
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "${{matrix.os.pypkg}} get-pip.py --break-system-packages --root-user-action ignore"
@@ -108,9 +108,9 @@ jobs:
108108
sudo tar -xvf dist/zstd-$version.tar.gz -C ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}}/build_wheel/
109109
false && sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} env
110110
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} pkg-config libzstd --modversion
111-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC
112-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} gcc -v
113-
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ && _CC=gcc-13 ZSTD_ASM=1 ZSTD_WARNINGS=1 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 _ZSTD_EXTERNAL=0 ${{matrix.os.pypkg}} setup.py bdist_wheel"
111+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} echo GCC-9
112+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} gcc-9 -v
113+
sudo chroot ./ubuntu-${{matrix.os.release}}-${{matrix.os.arch}} /bin/bash -c "cd /build_wheel/zstd-$version/ && _CC=gcc-9 ZSTD_ASM=1 ZSTD_WARNINGS=1 _ZSTD_ASM_BMI2=1 ZSTD_THREADS=1 _ZSTD_EXTERNAL=0 ${{matrix.os.pypkg}} setup.py bdist_wheel"
114114
115115
- name: Test wheel for ${{matrix.os.pypkg}} ${{matrix.os.arch}}
116116
if: matrix.os.matrix == 'linux'

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
from setuptools.command.build_ext import build_ext
1515

1616
# bundled ZSTD version
17-
VERSION = (1, 5, 6,)
17+
VERSION = (1, 5, 7,)
1818
VERSION_STR = ".".join([str(x) for x in VERSION])
1919

2020

2121
# Package version, even external
2222
PKG_VERSION = VERSION
2323
# Minor revision
24-
PKG_VERSION += ("8",)
24+
PKG_VERSION += ("0",)
2525
PKG_VERSION_STR = ".".join([str(x) for x in PKG_VERSION])
2626

2727

@@ -271,6 +271,7 @@ def build_extensions(self):
271271
'compress/zstd_compress_literals.c',
272272
'compress/zstd_compress_sequences.c',
273273
'compress/zstd_compress_superblock.c',
274+
'compress/zstd_preSplit.c',
274275
'compress/zstdmt_compress.c',
275276
'compress/zstd_fast.c',
276277
'compress/zstd_double_fast.c',

tests/base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ def raise_skip(msg):
5151

5252
class BaseTestZSTD(unittest.TestCase):
5353

54-
VERSION = "1.5.6"
55-
VERSION_INT = 10506
56-
VERSION_INT_MIN = 1 * 100*100 + 0 * 1*100 + 0
57-
PKG_VERSION = "1.5.6.8"
54+
VERSION = "1.5.7"
55+
VERSION_INT = 10507
56+
# minimal external version, must be >=1.4.0
57+
VERSION_INT_MIN = 1 * 100*100 + 4* 1*100 + 0
58+
PKG_VERSION = "1.5.7.0"
5859

5960
def helper_version(self):
6061
#if zstd.ZSTD_external():

tests/test_decompress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_decompression_null(self):
1111
else:
1212
DATA = b''
1313
self.assertRaises(zstd.Error, zstd.uncompress, zstd.compress(DATA)+b' ')
14-
14+
1515
def test_decompression_streamed(self):
1616
#log.info('cwd: %s' % os.getcwd())
1717
f = open("tests/test_data/facebook.ico.zst","rb")

tests/test_speed.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def test_compression_speed(self):
1919
cdata = zstd.compress(tDATA)
2020
sum+=l
2121

22-
log.info("Compression speed average =%6f Mb/sec" % (1.0*sum/1024/1024/wait,))
22+
log.info("Compression speed average = %6f Mb/sec" % (1.0*sum/1024/1024/wait,))
2323

24-
def test_decompression_speed(self):
24+
def test_decompression_block_speed(self):
2525
wait = 30
2626
log.info("\nWait %d seconds..." % wait)
2727
sum = 0
@@ -32,7 +32,24 @@ def test_decompression_speed(self):
3232
data = zstd.decompress(cdata)
3333
sum+=l
3434

35-
log.info("Decompression speed average =%6f Mb/sec" % (1.0*sum/1024/1024/wait,))
35+
log.info("Decompression of block data speed average = %6f Mb/sec" % (1.0*sum/1024/1024/wait,))
36+
37+
def test_decompression_stream_speed(self):
38+
wait = 30
39+
log.info("\nWait %d seconds..." % wait)
40+
sum = 0
41+
# cdata = zstd.compress(tDATA)
42+
# cdata = b'\x28\xb5\x2f\xfd\x00\x58\x11\x00\x00\x7b\x7d'
43+
f = open("tests/test_data/facebook.ico.zst","rb")
44+
cdata = f.read()
45+
f.close()
46+
l=len(cdata)
47+
tbegin = time()
48+
while time()-tbegin<wait:
49+
data = zstd.decompress(cdata)
50+
sum+=l
51+
52+
log.info("Decompression of streamed datspeed average = %6f Mb/sec" % (1.0*sum/1024/1024/wait,))
3653

3754
def test_check_speed(self):
3855
wait = 30
@@ -45,7 +62,7 @@ def test_check_speed(self):
4562
data = zstd.check(cdata)
4663
sum+=l
4764

48-
log.info("Check speed average =%6f Mb/sec" % (1.0*sum/1024/1024/wait,))
65+
log.info("Check speed average = %6f Mb/sec" % (1.0*sum/1024/1024/wait,))
4966

5067
if __name__ == '__main__':
5168
unittest.main()

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.6.8
1+
1.5.7.0

zstd

Submodule zstd updated 166 files

0 commit comments

Comments
 (0)