From a78b79b063a808bec0f463db1bb9dc78ba832a46 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 9 Jul 2011 10:29:31 -0600 Subject: [PATCH] Fix package dependencies --- memcache.asd | 2 +- memcache/util.lisp | 2 -- memstore.asd | 2 +- src/compress.lisp | 29 +++++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 src/compress.lisp diff --git a/memcache.asd b/memcache.asd index 2603159..468f394 100644 --- a/memcache.asd +++ b/memcache.asd @@ -11,7 +11,7 @@ (defsystem #:memcache :version "0.5.0" :author "Kevin Rosenberg , quasi " - :depends-on (usocket kmrcl) + :depends-on (usocket kmrcl cl-who) :components ((:module memcache :serial t :components diff --git a/memcache/util.lisp b/memcache/util.lisp index 50286a3..858e264 100644 --- a/memcache/util.lisp +++ b/memcache/util.lisp @@ -68,8 +68,6 @@ (:td (format stream "Current items stored in server")) (:td (format stream "~a" (memcache::mc-stats-curr-items stats)))) (:tr (:td (format stream "Current items total")) (:td (:b (format stream "~a" (memcache::mc-stats-curr-items-total stats))))) - (:tr - (:td (format stream "Current bytes used by server to store items")) (:td (format stream "~a MB" (float (/ (memcache::mc-stats-bytes stats) 1048576))))) (:tr (:td (format stream "Number of open connections")) (:td (format stream "~a" (memcache::mc-stats-curr-connections stats)))) (:tr diff --git a/memstore.asd b/memstore.asd index 35d4571..fa085d1 100644 --- a/memstore.asd +++ b/memstore.asd @@ -16,7 +16,7 @@ :author "Kevin M. Rosenberg " :version "1.0" :licence "BSD" - :depends-on (memcache cl-store flexi-streams zlib salza2 chipz) + :depends-on (memcache cl-store flexi-streams salza2 chipz) :components ((:module src :serial t :components diff --git a/src/compress.lisp b/src/compress.lisp new file mode 100644 index 0000000..c3920f7 --- /dev/null +++ b/src/compress.lisp @@ -0,0 +1,29 @@ +;; -*- Mode: Common-Lisp -*- +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; FILE IDENTIFICATION +;; +;; Name: compress.lisp +;; Purpose: Uses zlib to compress and uncompress vectors of octets +;; Author: Kevin Rosenberg +;; Date Started: July 2011 +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(in-package #:memstore) + +;; KMR: zlib gives compression errors on random tests: +;; indices outside of input array size +;; Using salza2 as default compressor +(defun compress (data) + (let ((comp (salza2:compress-data + data + (make-instance 'salza2:zlib-compressor)))) + (values comp (length comp)))) + +;; KMR: zlib appears to works fine with salza2 zlib compressor, but +;; moving to chipz as default decompressor as appears better supported +;;(defun uncompress-zlib (data) +;; (zlib:uncompress data)) + +(defun uncompress (data) + (chipz:decompress nil 'chipz:zlib data)) -- 2.34.1