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>
@@ -14,7 +14,7 @@ int main(int argc, const char **argv)
return -1;
}
b_compressor_mode mode = B_COMPRESSOR_MODE_DECOMPRESS;
fx_compressor_mode mode = FX_COMPRESSOR_MODE_DECOMPRESS;
FILE *in_fp = fopen(argv[1], "rb");
if (!in_fp) {
@@ -22,26 +22,26 @@ int main(int argc, const char **argv)
return -1;
}
b_stream *in_stream = b_stream_open_fp(in_fp);
b_cstream *cstream;
b_cstream_open(in_stream, B_TYPE_ZSTD_COMPRESSOR, mode, &cstream);
fx_stream *in_stream = fx_stream_open_fp(in_fp);
fx_cstream *cstream;
fx_cstream_open(in_stream, FX_TYPE_ZSTD_COMPRESSOR, mode, &cstream);
bool compressed = false;
char buf[513];
for (int i = 0;; i++) {
if (compressed) {
b_cstream_begin_compressed_section(cstream, NULL);
fx_cstream_begin_compressed_section(cstream, NULL);
}
memset(buf, 0x0, sizeof buf);
size_t nr_read = 0;
b_status status
= b_cstream_read(cstream, buf, sizeof buf - 1, &nr_read);
if (!B_OK(status)) {
fx_status status
= fx_cstream_read(cstream, buf, sizeof buf - 1, &nr_read);
if (!FX_OK(status)) {
fprintf(stderr, "write error: %s\n",
b_status_description(status));
fx_status_description(status));
break;
}
@@ -51,12 +51,12 @@ int main(int argc, const char **argv)
size_t nr_read_compressed = 0;
if (compressed) {
b_cstream_end_compressed_section(
fx_cstream_end_compressed_section(
cstream, &nr_read_compressed, &nr_read);
}
size_t tx_total = 0;
b_cstream_tx_bytes(cstream, &tx_total);
fx_cstream_tx_bytes(cstream, &tx_total);
printf(" * iteration %d: read %zu (compressed) / %zu "
"(uncompressed) / %zu (total) bytes (%s)\n",
i, nr_read_compressed, nr_read, tx_total,
@@ -68,8 +68,8 @@ int main(int argc, const char **argv)
printf("Done\n");
b_cstream_unref(cstream);
b_stream_unref(in_stream);
fx_cstream_unref(cstream);
fx_stream_unref(in_stream);
fclose(in_fp);
return 0;