From 528153b7dd473392562756092146979e28e2fbe4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 21 Jan 2010 11:59:08 -0800 Subject: [PATCH] libmd - Improve performance when doing a MD5 of a file via read(). * The code was using BUFSIZ, which is (ick) 1024 bytes. Increase the file buffer to 8192 bytes. --- lib/libmd/mdXhl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libmd/mdXhl.c b/lib/libmd/mdXhl.c index 96b71caeb3..6c12ac2857 100644 --- a/lib/libmd/mdXhl.c +++ b/lib/libmd/mdXhl.c @@ -50,7 +50,7 @@ MDXFile(const char *filename, char *buf) char * MDXFileChunk(const char *filename, char *buf, off_t ofs, off_t len) { - unsigned char buffer[BUFSIZ]; + unsigned char buffer[8192]; MDX_CTX ctx; struct stat stbuf; int f, i, e; -- 2.11.4.GIT