Lines Matching +full:- +full:- +full:with +full:- +full:zstd
2 """Test zstd interoperability between versions"""
8 # This source code is licensed under both the BSD-style license (found in the
11 # You may select, at your option, one of the above-listed licenses.
23 repo_url = 'https://github.com/facebook/zstd.git'
26 make_args = ['-j','CFLAGS=-O0']
50 stderr_lines = stderr_lines.decode("utf-8")
51 stdout_lines = stdout_lines.decode("utf-8")
83 stdout, stderr = git(['tag', '-l', 'v[0-9].[0-9].[0-9]'])
84 tags = stdout.decode('utf-8').split()
92 cmd = ['./zstd.' + tag, '-D', dict_name]
93 with open(sample, "rb") as i:
108 …result = execute('./dictBuilder.' + tag + ' ' + ' '.join(files) + ' -o ' + dict_name, print_output…
110 …result = execute('./zstd.' + tag + ' -f --train ' + ' '.join(files) + ' -o ' + dict_name, print_ou…
123 def zstd(tag, args, input_file, output_file): function
125 Zstd compress input_file to output_file.
127 Throws an exception if the command returns non-zero.
129 with open(input_file, "rb") as i:
130 with open(output_file, "wb") as o:
131 cmd = ['./zstd.' + tag] + args
142 verbose = ['-v', '-v', '-v']
143 zstd(tag, ['-D', dict_name, '-1'] + verbose, sample, sample + '_01_64_' + tag + '_dictio.zst')
144 zstd(tag, ['-D', dict_name, '-3'], sample, sample + '_03_64_' + tag + '_dictio.zst')
145 zstd(tag, ['-D', dict_name, '-5'], sample, sample + '_05_64_' + tag + '_dictio.zst')
146 zstd(tag, ['-D', dict_name, '-9'], sample, sample + '_09_64_' + tag + '_dictio.zst')
147 zstd(tag, ['-D', dict_name, '-15'], sample, sample + '_15_64_' + tag + '_dictio.zst')
148 zstd(tag, ['-D', dict_name, '-18'], sample, sample + '_18_64_' + tag + '_dictio.zst')
155 zstd(tag, ['-1'], sample, sample + '_01_64_' + tag + '_nodict.zst')
156 zstd(tag, ['-3'], sample, sample + '_03_64_' + tag + '_nodict.zst')
157 zstd(tag, ['-5'], sample, sample + '_05_64_' + tag + '_nodict.zst')
158 zstd(tag, ['-9'], sample, sample + '_09_64_' + tag + '_nodict.zst')
159 zstd(tag, ['-15'], sample, sample + '_15_64_' + tag + '_nodict.zst')
160 zstd(tag, ['-18'], sample, sample + '_18_64_' + tag + '_nodict.zst')
168 with open(filepath, 'rb') as f:
192 zstd(tag, ['-d'], file_zst, file_dec)
203 dict_tag = file_zst[0:len(file_zst)-11] # remove "_dictio.zst"
213 zstd(tag, ['-D', dict_name, '-d'], file_zst, file_dec)
222 base_dir = os.getcwd() + '/..' # /path/to/zstd
223 tmp_dir = base_dir + '/' + tmp_dir_name # /path/to/zstd/tests/versionsTest
224 clone_dir = tmp_dir + '/' + 'zstd' # /path/to/zstd/tests/versionsTest/zstd
225 dict_source_path = tmp_dir + '/' + dict_source # /path/to/zstd/tests/versionsTest/dict_source
226 programs_dir = base_dir + '/programs' # /path/to/zstd/programs
242 # Build all release zstd
245 dst_zstd = '{}/zstd.{}'.format(tmp_dir, tag) # /path/to/zstd/tests/versionsTest/zstd.<TAG>
248 print('-----------------------------------------------')
250 print('-----------------------------------------------')
251 r_dir = '{}/{}'.format(tmp_dir, tag) # /path/to/zstd/tests/versionsTest/<TAG>
254 git(['--work-tree=' + r_dir, 'checkout', tag, '--', '.'], False)
256 … os.chdir(r_dir + '/dictBuilder') # /path/to/zstd/tests/versionsTest/v0.5.0/dictBuilder
260 os.chdir(r_dir + '/programs') # /path/to/zstd/tests/versionsTest/<TAG>/programs
262 make(['zstd'], False)
265 print('-----------------------------------------------')
267 print('-----------------------------------------------')
268 make(['zstd'], False)
269 shutil.copy2('zstd', dst_zstd)
288 print('-----------------------------------------------')
289 print('Compress test.dat by all released zstd')
290 print('-----------------------------------------------')
307 for zstd in zstds:
308 print(zstd + ' : ' + repr(os.path.getsize(zstd)) + ', ' + sha1_of_file(zstd))