linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: rmoser <mlmoser@comcast.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Re:  Swap Compression
Date: Sun, 27 Apr 2003 11:04:18 +0200	[thread overview]
Message-ID: <20030427090418.GB6961@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <200304262224040410.031419FD@smtp.comcast.net>

On Sat, 26 April 2003 22:24:04 -0400, rmoser wrote:
> 
> So what's the best way to do this?  I was originally thinking like this:
> 
> Grab some swap data
> Stuff it into fcomp_push()
> When you have 100k of data, seal it up
> Write that 100k block

I would like something like this:

/*	fox_compress
 *	@input: Pointer to uncompressed data
 *	@output: Pointer to buffer
 *	@inlen: Size of uncompressed data
 *	@outlen: Size of the buffer
 *
 *	Return:
 *	0 on successful compression
 *	-Esomething on error
 *
 *	Side effects:
 *	Output buffer is filled with random data after an error
 *	condition or the compressed input data on success.
 *	outlen remains unchanged on error and holds the compressed
 *	data size on success
 *
 *	If the output buffer is too small, this is an error.
 */
int fox_compress(unsigned char *input, unsigned char *output,
		uint32_t inlen, uint32_t *outlen);

/*	fox_decompress
 *	see above, basically
 */
int fox_decompress(unsigned char *input, unsigned char *output,
		uint32_t inlen, uint32_t *outlen);

Then the mm code can pick any useful size for compression.

Jörn

-- 
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra

  reply	other threads:[~2003-04-27  8:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25 22:48 Re: Swap Compression rmoser
2003-04-26  9:17 ` Jörn Engel
     [not found]   ` <200304261148590300.00CE9372@smtp.comcast.net>
     [not found]     ` <20030426160920.GC21015@wohnheim.fh-wedel.de>
2003-04-26 23:41       ` Some code for " rmoser
2003-04-27  2:24       ` rmoser
2003-04-27  9:04         ` Jörn Engel [this message]
2003-04-27 17:24           ` rmoser
2003-04-27 17:51             ` Jörn Engel
2003-04-27 18:22               ` William Lee Irwin III
2003-04-27 18:31               ` rmoser
2003-04-27 19:04                 ` Jörn Engel
2003-04-27 19:57                   ` Livio Baldini Soares
2003-04-27 20:24                     ` rmoser
     [not found]                   ` <200304271609460030.01FC8C2B@smtp.comcast.net>
2003-04-27 20:10                     ` rmoser
2003-04-27 21:52                   ` rmoser
2003-04-27 21:55                     ` Re: Swap Compression -- Try 2 rmoser
2003-04-28  8:52                   ` Swap Compression Eric W. Biederman
2003-04-28 10:26                     ` Jörn Engel
     [not found]                 ` <3EAE8899.2010208@techsource.com>
     [not found]                   ` <200304291521120230.0462A551@smtp.comcast.net>
2003-04-29 19:21                     ` rmoser
     [not found]         ` <3EADAA5D.1090408@techsource.com>
     [not found]           ` <200304282258310030.00DED562@smtp.comcast.net>
2003-04-29  2:58             ` rmoser
  -- strict thread matches above, loose matches on Subject: below --
2003-04-25 22:32 rmoser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030427090418.GB6961@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlmoser@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).