This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
cmake_minimum_required(VERSION 3.17) | |
cmake_policy(SET CMP0091 NEW) | |
project(adler32_benchmark CXX) | |
set(BENCHMARK_ENABLE_GTEST_TESTS OFF) | |
add_executable(adler32_benchmark) | |
add_subdirectory(benchmark) | |
target_sources(adler32_benchmark PRIVATE adler32_benchmark.cc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
cmake_minimum_required(VERSION 3.17) | |
cmake_policy(SET CMP0091 NEW) | |
include(FetchContent) | |
project(crc32_benchmark CXX) | |
set(CMAKE_CXX_STANDARD 14) | |
set(CMAKE_CXX_STANDARD_REQUIRED YES) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import { Table, Button, Space, Row, Col } from "antd"; | |
import { LeftOutlined, RightOutlined } from "@ant-design/icons"; | |
const CursorPagination = ({ startKey, lastEvaluatedKey, onChange, size }) => { | |
/* Use stack to keep track of which evaluated keys have been previously seen */ | |
const [ prevEvaluatedKeys, setPrevEvaluatedKeys ] = useState([]); | |
/* Keep track of the current evaluated key */ | |
const [ currentEvaluatedKey, setCurrentEvaluatedKey ] = useState(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <cstdlib> | |
#include <map> | |
unsigned bi_reverse(unsigned code, int len) { | |
/* code: the value to invert */ | |
/* len: its bit length */ | |
unsigned long res = 0; | |
do { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
if sys.version_info.major < 3: | |
print('Python 3 or higher is required to run this script') | |
exit(1) | |
import os | |
import argparse | |
import codecs | |
import pprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(gdb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${command:cmake.launchTargetPath}", | |
"args": ["checksum_fuzzer", ".git", ".gitattributes", ".github", ".gitignore", ".not-used", ".shellcheckrc", "CMakeFiles", "CMakeLists.txt", "FAQ.zlib", "INDEX.md", "LICENSE.md", "Makefile.in", "README.md", "adler32.c", "adler32_p.h", "arch", "chunkset.c", "chunkset_tpl.h", "cmake", "compare258.c", "compress.c", "configure", "crc32.c", "crc32_p.h", "crc32_tbl.h", "deflate.c", "deflate.h", "deflate_fast.c", "deflate_medium.c", "deflate_p.h", "deflate_quick.c", "deflate_slow.c", "doc", "fallback_builtins.h", "functable.c", "functable.h", "gzguts.h", "gzlib.c", "gzread.c", "gzwrite.c", "infback.c", "inffast.c", "inffast.h", "inffixed_tbl.h", "inflate.c", "inflate.h", "inflate_p.h", "inftrees.c", "inftrees.h", "insert_string.c", "insert_string_tpl.h", "match_tpl.h", "test", "tools", "tr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Results in the comments.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
import argparse | |
parser = argparse.ArgumentParser(description='Switchlevel burn script') | |
parser.add_argument('--bin_dir', help='Binaries directory', default='.\\Debug\\') | |
parser.add_argument('--test_file', help='Test file to compress', default='test/data/lcet10.txt') | |
args, unknown = parser.parse_known_args() | |
for y in range(0, 100000): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* deflateparams.c -- test deflate under specific conditions | |
* Copyright (C) 2020 Nathan Moinvaziri | |
* For conditions of distribution and use, see copyright notice in zlib.h | |
*/ | |
/* | |
add_executable(deflateparams test/deflateparams.c) | |
configure_test_executable(deflateparams) | |
target_link_libraries(deflateparams zlib) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* longest_match_benchmark.cc -- test longest_match timing | |
* Copyright (C) 2020 Nathan Moinvaziri | |
* For conditions of distribution and use, see copyright notice in zlib.h | |
*/ | |
/* | |
cmake . -A Win32 -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DWITH_GZFILEOP=ON -DBUILD_SHARED_LIBS=OFF | |
cmake_minimum_required(VERSION 3.17) | |
cmake_policy(SET CMP0091 NEW) |