Test commands
> echo "Hello world" | zstd -o test.zst
> zstdcat test.zst
Hello world
> vim test.zst
GA<ENTER>Hello<ESC>:wq<ENTER>
> zstdcat test.zst
Hello world
Hello
#include <string> | |
#include <string_view> | |
#include <vector> | |
#include <folly/ScopeGuard.h> | |
#define ZSTD_STATIC_LINKING_ONLY | |
#include <zstd.h> | |
namespace { |
#include <chrono> | |
#include <stdio.h> | |
namespace { | |
void wait_for_needle(char const* needle) { | |
char const* suffix = needle; | |
while (*suffix != '\0') { | |
auto const c = getc(stdin); | |
if (c == *suffix) { | |
++suffix; |
#!/usr/bin/env sh | |
set -e | |
# Use this script to check if your platform has instability. | |
# Set ENWIK8 to the data you want to test. It doesn't necessarily | |
# have to be enwik8, any data should have the same results, but that | |
# is what I used. If you don't have it on your machine, just use another | |
# largeish file. Set COMPILERS to the compilers you want to test. | |
# It is good if the DSB cycles are always high and the MITE cycles are |
use std::collections::HashMap; | |
fn to_wire(wire: &str) -> HashMap<(i32, i32), i32> { | |
let mut c: (i32, i32) = (0, 0); | |
let mut v = HashMap::new(); | |
let mut s = 1; | |
for dir in wire.split(",") { | |
let n: i32 = dir[1..].parse().unwrap(); | |
for _ in 0..n { | |
if dir.starts_with("L") { |
#define ZSTD_STATIC_LINKING_ONLY | |
#include <zstd.h> | |
#include <stdio.h> | |
#include <stddef.h> | |
#include <stdlib.h> | |
void compress(ZSTD_CStream *ctx, ZSTD_outBuffer out, const void *data, size_t size) { | |
ZSTD_inBuffer in = { data, size, 0 }; | |
while (in.pos < in.size) { | |
ZSTD_outBuffer tmp = out; |
#define LZ4_STREAMSIZE_U64 ((1 << (LZ4_MEMORY_USAGE-3)) + 4) | |
#define LZ4_STREAMSIZE (LZ4_STREAMSIZE_U64 * sizeof(long long)) | |
typedef struct { | |
union { | |
struct LZ4_stream_t_internal internal; | |
long long table[LZ4_STREAMSIZE_U64]; | |
}; | |
} LZ4_stream_t; |
Test commands
> echo "Hello world" | zstd -o test.zst
> zstdcat test.zst
Hello world
> vim test.zst
GA<ENTER>Hello<ESC>:wq<ENTER>
> zstdcat test.zst
Hello world
Hello
runtime/doc/pi_gzip.txt | 1 + | |
runtime/doc/usr_23.txt | 3 +++ | |
runtime/plugin/gzip.vim | 6 +++++- | |
3 files changed, 9 insertions(+), 1 deletion(-) | |
diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt | |
index 31cd81b..f76507e 100644 | |
--- a/runtime/doc/pi_gzip.txt | |
+++ b/runtime/doc/pi_gzip.txt | |
@@ -27,6 +27,7 @@ with these extensions: |
#include <iostream> | |
struct skeleton { | |
skeleton() { std::cout << "skeleton()" << std::endl; } | |
skeleton(const skeleton&) { std::cout << "skeleton(const skeleton&)" << std::endl; } | |
skeleton(skeleton&) { std::cout << "skeleton(skeleton&)" << std::endl; } | |
skeleton(const skeleton&&) { std::cout << "skeleton(const skeleton&&)" << std::endl; } | |
skeleton(skeleton&&) { std::cout << "skeleton(skeleton&&)" << std::endl; } | |
skeleton& operator=(const skeleton&) { |
#include <stdlib.h> | |
#include <cstdlib> | |
#include <cstddef> | |
#include <iostream> | |
namespace monstrous { | |
struct DataNode; | |
/** | |
* The global variable for the linked list. |