meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -1,9 +1,9 @@
#include <assert.h>
#include <blue/compress/compressor.h>
#include <blue/compress/cstream.h>
#include <blue/compress/zstd.h>
#include <blue/core/ringbuffer.h>
#include <blue/core/stream.h>
#include <fx/compress/compressor.h>
#include <fx/compress/cstream.h>
#include <fx/compress/zstd.h>
#include <fx/core/ringbuffer.h>
#include <fx/core/stream.h>
#include <stdio.h>
#include <string.h>
@@ -26,7 +26,7 @@ int main(int argc, const char **argv)
return -1;
}
b_compressor_mode mode = B_COMPRESSOR_MODE_COMPRESS;
fx_compressor_mode mode = FX_COMPRESSOR_MODE_COMPRESS;
FILE *out_fp = fopen(argv[1], "wb");
if (!out_fp) {
@@ -34,36 +34,36 @@ int main(int argc, const char **argv)
return -1;
}
b_stream *out_stream = b_stream_open_fp(out_fp);
b_cstream *cstream;
b_cstream_open(out_stream, B_TYPE_ZSTD_COMPRESSOR, mode, &cstream);
fx_stream *out_stream = fx_stream_open_fp(out_fp);
fx_cstream *cstream;
fx_cstream_open(out_stream, FX_TYPE_ZSTD_COMPRESSOR, mode, &cstream);
const size_t source_len = strlen(source);
bool compressed = false;
for (int i = 0; i < NR_ITERATIONS; i++) {
if (compressed) {
b_cstream_begin_compressed_section(cstream, NULL);
fx_cstream_begin_compressed_section(cstream, NULL);
}
size_t nr_written = 0;
b_status status = b_cstream_write(
fx_status status = fx_cstream_write(
cstream, source, source_len, &nr_written);
if (!B_OK(status)) {
if (!FX_OK(status)) {
fprintf(stderr, "write error: %s\n",
b_status_description(status));
fx_status_description(status));
break;
}
size_t nr_written_compressed = 0;
if (compressed) {
b_cstream_end_compressed_section(
fx_cstream_end_compressed_section(
cstream, &nr_written_compressed, &nr_written);
}
size_t tx_total = 0;
b_cstream_tx_bytes(cstream, &tx_total);
fx_cstream_tx_bytes(cstream, &tx_total);
printf("iteration %d: wrote %zu (compressed) / %zu "
"(uncompressed) / %zu (total) bytes (%s)\n",
i, nr_written_compressed, nr_written, tx_total,
@@ -74,8 +74,8 @@ int main(int argc, const char **argv)
printf("Done\n");
b_cstream_unref(cstream);
b_stream_unref(out_stream);
fx_cstream_unref(cstream);
fx_stream_unref(out_stream);
fclose(out_fp);
return 0;