Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/vcl/qt6/   (Linux Kernel Version 6.17.9©)  Datei vom 5.10.2025 mit Größe 508 B image not shown  

Quellcode-Bibliothek backend_lzo.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0-or-later

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/lzo.h>

#include "backend_lzo.h"

static void lzo_release_params(struct zcomp_params *params)
{
}

static int lzo_setup_params(struct zcomp_params *params)
{
 return 0;
}

static int lzo_create(struct zcomp_params *params, struct zcomp_ctx *ctx)
{
 ctx->context = kzalloc(LZO1X_MEM_COMPRESS, GFP_KERNEL);
 if (!ctx->context)
  return -ENOMEM;
 return 0;
}

static void lzo_destroy(struct zcomp_ctx *ctx)
{
 kfree(ctx->context);
}

static int lzo_compress(struct zcomp_params *params, struct zcomp_ctx *ctx,
   struct zcomp_req *req)
{
 int ret;

 ret = lzo1x_1_compress(req->src, req->src_len, req->dst,
          &req->dst_len, ctx->context);
 return ret == LZO_E_OK ? 0 : ret;
}

static int lzo_decompress(struct zcomp_params *params, struct zcomp_ctx *ctx,
     struct zcomp_req *req)
{
 int ret;

 ret = lzo1x_decompress_safe(req->src, req->src_len,
        req->dst, &req->dst_len);
 return ret == LZO_E_OK ? 0 : ret;
}

const struct zcomp_ops backend_lzo = {
 .compress = lzo_compress,
 .decompress = lzo_decompress,
 .create_ctx = lzo_create,
 .destroy_ctx = lzo_destroy,
 .setup_params = lzo_setup_params,
 .release_params = lzo_release_params,
 .name  = "lzo",
};

Messung V0.5 in Prozent
C=93 H=94 G=93

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.13Bemerkung:  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.