Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  backend_842.c   Sprache: C

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

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sw842.h>
#include <linux/vmalloc.h>

#include "backend_842.h"

static void release_params_842(struct zcomp_params *params)
{
}

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

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

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

static int compress_842(struct zcomp_params *params, struct zcomp_ctx *ctx,
   struct zcomp_req *req)
{
 unsigned int dlen = req->dst_len;
 int ret;

 ret = sw842_compress(req->src, req->src_len, req->dst, &dlen,
        ctx->context);
 if (ret == 0)
  req->dst_len = dlen;
 return ret;
}

static int decompress_842(struct zcomp_params *params, struct zcomp_ctx *ctx,
     struct zcomp_req *req)
{
 unsigned int dlen = req->dst_len;

 return sw842_decompress(req->src, req->src_len, req->dst, &dlen);
}

const struct zcomp_ops backend_842 = {
 .compress = compress_842,
 .decompress = decompress_842,
 .create_ctx = create_842,
 .destroy_ctx = destroy_842,
 .setup_params = setup_params_842,
 .release_params = release_params_842,
 .name  = "842",
};

Messung V0.5
C=99 H=93 G=95

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge