[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [Imgcif-l] Reading CBF files from Python
- To: The Crystallographic Binary File and its imgCIF application to image data <imgcif-l@iucr.org>
- Subject: Re: [Imgcif-l] Reading CBF files from Python
- From: "Nicholas K. Sauter" <nksauter@lbl.gov>
- Date: Sat, 03 Jul 2010 21:03:43 -0700
- In-Reply-To: <4854F2500EA8C4478A508D2D92973E5206D6B655@EXCHANGE25.fed.cclrc.ac.uk>
- References: <4854F2500EA8C4478A508D2D92973E5206D6B5F9@EXCHANGE25.fed.cclrc.ac.uk><4C1F2B5C.30400@esrf.fr><4854F2500EA8C4478A508D2D92973E5206D6B5FA@EXCHANGE25.fed.cclrc.ac.uk><4C1F8A65.2020504@lbl.gov><4854F2500EA8C4478A508D2D92973E5206D6B604@EXCHANGE25.fed.cclrc.ac.uk><4C224E02.1060304@lbl.gov><4854F2500EA8C4478A508D2D92973E5206D6B610@EXCHANGE25.fed.cclrc.ac.uk><4854F2500EA8C4478A508D2D92973E5206D6B655@EXCHANGE25.fed.cclrc.ac.uk>
All, OK, Graeme Winter's compress/uncompress routines are now checked in to the open source Computational Crystallography Toolbox, http://cctbx.sf.net. They use the CBF byte-offset algorithm to convert an integer array to compressed string and vice versa. A Python unit test to excercise the entire cycle is at cctbx_sources/cbflib_adaptbx/excercise_compression.py Herbert--- You were right: reading the entire compressed file directly into a memory buffer allows the decompression routine to operate much faster, compared with getc() or a smaller buffer. 2Kx2K files compress & uncompress in about 50 ms...faster than anything else I've seen! Nick Sauter Graeme.Winter@Diamond.ac.uk wrote: > Hi Folks, > > In case anyone is interested, I coded up a pretty simple implementation > of the byte offset compression and decompression in C++, with the > interface > > vector<char> compress(vector<int> data) > vector<int> uncompress(vector<char> packed) > > It could be useful for people wanting to "edit" images, which is what I > had in mind. It's finding it's way into cctbx (thanks Nick!) but I will > be happy to mail it out if anyone would like it. > > Best wishes, > > Graeme > > > > _______________________________________________ imgcif-l mailing list imgcif-l@iucr.org http://scripts.iucr.org/mailman/listinfo/imgcif-l
Reply to: [list | sender only]
- References:
- [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Jon Wright)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Nicholas K. Sauter)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Nicholas K. Sauter)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Prev by Date: Re: [Imgcif-l] Reading CBF files from Python
- Next by Date: [Imgcif-l] Reading CBF file headers from Python with PyCifRW
- Prev by thread: Re: [Imgcif-l] Reading CBF files from Python
- Next by thread: [Imgcif-l] Update: Possible bug in cbf_byte_offset.c
- Index(es):