From 8df946943d0a47b67b63410eefcf190a8bf2aa16 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sat, 21 Aug 2021 20:38:29 +0000 Subject: fix broken hashbangs --- tests/test_custom_block_sizes.sh | 2 +- tests/test_install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_custom_block_sizes.sh b/tests/test_custom_block_sizes.sh index aba6733..56ba710 100755 --- a/tests/test_custom_block_sizes.sh +++ b/tests/test_custom_block_sizes.sh @@ -1,4 +1,4 @@ -#/usr/bin/env sh +#!/usr/bin/env sh set -e LZ4=../lz4 diff --git a/tests/test_install.sh b/tests/test_install.sh index 122bac5..cb9d8bb 100755 --- a/tests/test_install.sh +++ b/tests/test_install.sh @@ -1,4 +1,4 @@ -#/usr/bin/env sh +#!/usr/bin/env sh set -e -- cgit v0.12 From d68bfbde54ea1132dde615dcac58b2983f7a7a66 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sat, 21 Aug 2021 20:45:30 +0000 Subject: use the same style of hashbang for all files --- tests/test-lz4-list.py | 2 +- tests/test-lz4-speed.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-lz4-list.py b/tests/test-lz4-list.py index ce89757..b8d844a 100644 --- a/tests/test-lz4-list.py +++ b/tests/test-lz4-list.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python3 import subprocess import time import glob diff --git a/tests/test-lz4-speed.py b/tests/test-lz4-speed.py index 4a17d93..658939c 100644 --- a/tests/test-lz4-speed.py +++ b/tests/test-lz4-speed.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python3 # # Copyright (c) 2016-2020, Przemyslaw Skibinski, Yann Collet, Facebook, Inc. -- cgit v0.12 From 6a8e21d8022a6880c9f46803463ebf93723d0885 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sat, 21 Aug 2021 20:46:04 +0000 Subject: fix warnings reported by shellcheck in shell scripts --- tests/test_custom_block_sizes.sh | 2 +- tests/test_install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_custom_block_sizes.sh b/tests/test_custom_block_sizes.sh index 56ba710..2f6591f 100755 --- a/tests/test_custom_block_sizes.sh +++ b/tests/test_custom_block_sizes.sh @@ -62,7 +62,7 @@ do done rm $TMPFILE.lz4 $TMPFILE1 $TMPFILE1.lz4 $TMPFILE2 $TMPFILE2.lz4 -if [ "$failures" == "" ] +if [ "$failures" = "" ] then echo ---- All tests passed exit 0 diff --git a/tests/test_install.sh b/tests/test_install.sh index cb9d8bb..ad0d4eb 100755 --- a/tests/test_install.sh +++ b/tests/test_install.sh @@ -6,7 +6,7 @@ make="make -C $lz4_root" unamestr=$(uname) if [ "$unamestr" = 'Linux' ]; then make="make -C $lz4_root" -elif [ "$unamestr" = 'FreeBSD' -o "$unamestr" = 'OpenBSD' ]; then +elif [ "$unamestr" = 'FreeBSD' ] || [ "$unamestr" = 'OpenBSD' ]; then make="gmake -C $lz4_root" fi -- cgit v0.12 From eb23590d13c14bb0ab5300c8bb356de2274b43b2 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sat, 21 Aug 2021 20:50:38 +0000 Subject: fix spelling --- doc/lz4_Frame_format.md | 8 ++++---- examples/blockStreaming_lineByLine.md | 4 ++-- examples/frameCompress.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/lz4_Frame_format.md b/doc/lz4_Frame_format.md index de29189..7b6c2ef 100644 --- a/doc/lz4_Frame_format.md +++ b/doc/lz4_Frame_format.md @@ -6,8 +6,8 @@ LZ4 Frame Format Description Copyright (c) 2013-2020 Yann Collet Permission is granted to copy and distribute this document -for any purpose and without charge, -including translations into other languages +for any purpose and without charge, +including translations into other languages and incorporation into compilations, provided that the copyright notice and this notice are preserved, and that any substantive changes or deletions from the original @@ -47,7 +47,7 @@ at the level of bits and other primitive data representations. Unless otherwise indicated below, a compliant compressor must produce data sets that conform to the specifications presented here. -It doesn’t need to support all options though. +It doesn't need to support all options though. A compliant decompressor must be able to decompress at least one working set of parameters @@ -385,7 +385,7 @@ __EndMark__ End of legacy frame is implicit only. It must be followed by a standard EOF (End Of File) signal, -wether it is a file or a stream. +whether it is a file or a stream. Alternatively, if the frame is followed by a valid Frame Magic Number, it is considered completed. diff --git a/examples/blockStreaming_lineByLine.md b/examples/blockStreaming_lineByLine.md index 4735f92..90342f6 100644 --- a/examples/blockStreaming_lineByLine.md +++ b/examples/blockStreaming_lineByLine.md @@ -1,7 +1,7 @@ # LZ4 Streaming API Example : Line by Line Text Compression by *Takayuki Matsuoka* -`blockStreaming_lineByLine.c` is LZ4 Straming API example which implements line by line incremental (de)compression. +`blockStreaming_lineByLine.c` is LZ4 Streaming API example which implements line by line incremental (de)compression. Please note the following restrictions : @@ -117,6 +117,6 @@ Decompression will do reverse order. - Read compressed line from the file to buffer. - Decompress it to the ringbuffer. - Output decompressed plain text line to the file. - - Forward ringbuffer offset. If offset exceedes end of the ringbuffer, reset it. + - Forward ringbuffer offset. If offset exceeds end of the ringbuffer, reset it. Continue these procedure to the end of the compressed file. diff --git a/examples/frameCompress.c b/examples/frameCompress.c index aac4a3b..4a88b50 100644 --- a/examples/frameCompress.c +++ b/examples/frameCompress.c @@ -125,7 +125,7 @@ compress_file(FILE* f_in, FILE* f_out) assert(f_in != NULL); assert(f_out != NULL); - /* ressource allocation */ + /* resource allocation */ LZ4F_compressionContext_t ctx; size_t const ctxCreation = LZ4F_createCompressionContext(&ctx, LZ4F_VERSION); void* const src = malloc(IN_CHUNK_SIZE); @@ -286,7 +286,7 @@ static int decompress_file(FILE* f_in, FILE* f_out) { assert(f_in != NULL); assert(f_out != NULL); - /* Ressource allocation */ + /* Resource allocation */ void* const src = malloc(IN_CHUNK_SIZE); if (!src) { perror("decompress_file(src)"); return 1; } -- cgit v0.12 From 3e99d07bc09e1b82ee6191527bb3e555052c55ac Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sat, 21 Aug 2021 22:24:52 +0000 Subject: trim excess whitespace --- .github/workflows/ci.yml | 2 +- .travis.yml | 2 +- lib/README.md | 2 +- tests/README.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84871c2..74e203d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,7 @@ jobs: # - LZ4 Frame # - LZ4 versions # - Custom LZ4_DISTANCE_MAX -# +# lz4-benchmark: name: Benchmark runs-on: ubuntu-latest diff --git a/.travis.yml b/.travis.yml index 8eae1a2..4656cbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -231,7 +231,7 @@ matrix: - name: Compile OSS-Fuzz targets script: - ./ossfuzz/travisoss.sh - + # Unicode lint # See https://github.com/lz4/lz4/issues/1018 - name: Run Unicode lint diff --git a/lib/README.md b/lib/README.md index e2af868..884c797 100644 --- a/lib/README.md +++ b/lib/README.md @@ -101,7 +101,7 @@ All `*.h` files present in `/lib` remain necessary to compile `lz4_all.c`. DLL can be created using MinGW+MSYS with the `make liblz4` command. This command creates `dll\liblz4.dll` and the import library `dll\liblz4.lib`. -To override the `dlltool` command when cross-compiling on Linux, just set the `DLLTOOL` variable. Example of cross compilation on Linux with mingw-w64 64 bits: +To override the `dlltool` command when cross-compiling on Linux, just set the `DLLTOOL` variable. Example of cross compilation on Linux with mingw-w64 64 bits: ``` make BUILD_STATIC=no CC=x86_64-w64-mingw32-gcc DLLTOOL=x86_64-w64-mingw32-dlltool OS=Windows_NT ``` diff --git a/tests/README.md b/tests/README.md index 75b7b9f..37d7d72 100644 --- a/tests/README.md +++ b/tests/README.md @@ -37,7 +37,7 @@ Additional remarks: The example usage with two test files, one e-mail address, and with an additional message: ``` ./test-lz4-speed.py "silesia.tar calgary.tar" "email@gmail.com" --message "tested on my laptop" --sleepTime 60 -``` +``` To run the script in background please use: ``` -- cgit v0.12