Your message dated Wed, 03 Mar 2010 09:51:38 +0000
with message-id <[email protected]>
and subject line Bug#556652: fixed in libmatio 1.3.3-7
has caused the Debian Bug report #556652,
regarding Compressed mat files written by matio cannot be loaded by 
octave/scilab
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
556652: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556652
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libmatio0
Version: 1.3.3-5
Severity: normal

octave can't read compressed files written by libmatio.  I'm not sure
if this is a problem in libmatio or in octave, so feel free to
reassign as necessary.

The following program uses libmatio to write a simple data structure
to a compressed mat file:

#include <stdio.h>
#include <string.h>
#include <errno.h>

#include <matio.h>

#define NRSIGNALS 2
#define NRSAMPLES 100

int write_matfile( const char *fname )
{
        mat_t *mat = NULL;
        matvar_t **matchannels = NULL;

        mat = Mat_Open( fname, 0 );
        if ( mat==NULL )
        {
                fprintf( stderr, "Can't open file `%s' for output\n", fname );
                return 0;
        }

        /* allocate memory for the channels */
        matchannels = malloc( NRSIGNALS * sizeof(*matchannels) );

        /* create a structure for each channel */
        for ( int i = 0; i < NRSIGNALS; i++ )
        {
                int dims[2] = {1,1};
                matvar_t ** matdata = malloc( 2 * sizeof(*matdata) );

                matdata[0] = Mat_VarCreate( "channel",    MAT_C_INT16,  
MAT_T_INT16,  2, dims, &i, 0 );
                matdata[1] = NULL;

                matchannels[i] = Mat_VarCreate( "", MAT_C_STRUCT, MAT_T_STRUCT, 
2, dims, matdata, 0 );

        }

        /* the structures for the channels are combined into a single cell 
array */
        int dims[2] = {1,NRSIGNALS};
        matvar_t * matvar_cell = 
Mat_VarCreate("data",MAT_C_CELL,MAT_T_CELL,2,dims,matchannels,0);

        /* write the file to disk */
        Mat_VarWrite( mat, matvar_cell, COMPRESSION_ZLIB );
        //Mat_VarWrite( mat, matvar_cell, 0 );

        Mat_Close( mat );

        return 1;

}

int main()
{
        write_matfile( "/tmp/foo.mat" );
        return(0);
} 



Observe:

[...@basbak2]/tmp> gcc edf2mat.c -std=c99 -lmatio && ./a.out
[...@basbak2]/tmp> ls -la foo.mat
-rw-r--r-- 1 bas bas 215 nov 17 13:47 foo.mat
[...@basbak2]/tmp> file foo.mat
foo.mat: Matlab v5 mat-file (little endian) version 0x0100
[...@basbak2]/tmp> octave3.2 -q
octave3.2:1> load('foo.mat')
error: load: error uncompressing data element


The file loads fine in matlab.  If the file is written without
compression, it also loads fine in octave.



-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



--- End Message ---
--- Begin Message ---
Source: libmatio
Source-Version: 1.3.3-7

We believe that the bug you reported is fixed in the latest version of
libmatio, which is due to be installed in the Debian FTP archive:

libmatio-dev_1.3.3-7_i386.deb
  to main/libm/libmatio/libmatio-dev_1.3.3-7_i386.deb
libmatio-doc_1.3.3-7_all.deb
  to main/libm/libmatio/libmatio-doc_1.3.3-7_all.deb
libmatio0-dbg_1.3.3-7_i386.deb
  to main/libm/libmatio/libmatio0-dbg_1.3.3-7_i386.deb
libmatio0_1.3.3-7_i386.deb
  to main/libm/libmatio/libmatio0_1.3.3-7_i386.deb
libmatio_1.3.3-7.diff.gz
  to main/libm/libmatio/libmatio_1.3.3-7.diff.gz
libmatio_1.3.3-7.dsc
  to main/libm/libmatio/libmatio_1.3.3-7.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sylvestre Ledru <[email protected]> (supplier of updated libmatio package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 03 Mar 2010 10:35:05 +0100
Source: libmatio
Binary: libmatio-dev libmatio0 libmatio0-dbg libmatio-doc
Architecture: source all i386
Version: 1.3.3-7
Distribution: unstable
Urgency: low
Maintainer: Debian Science Team 
<[email protected]>
Changed-By: Sylvestre Ledru <[email protected]>
Description: 
 libmatio-dev - MAT File I/O Library - development files
 libmatio-doc - MAT File I/O Library - documentation files
 libmatio0  - A library to read and write Matlab MAT files
 libmatio0-dbg - MAT File I/O Library - development files
Closes: 556652
Changes: 
 libmatio (1.3.3-7) unstable; urgency=low
 .
   * Uses ghostscript-x instead of gs-gpl
 .
   [ Vincent Couvert from Scilab ]
   * Fix a compression read size issues. read-size-issue.diff (Closes: #556652)
   * Fix a bug in the sparse complex matrices handling.
     sparsecomplexmatrices.diff
   * Improves feedback when cannot read a mat file. catcherror.diff
Checksums-Sha1: 
 45bc4114f80d371f604487540ca3ae413543bcd3 1400 libmatio_1.3.3-7.dsc
 d5d37e1e9fc67f3528a5f05b56d9c1a11d69d82b 3419 libmatio_1.3.3-7.diff.gz
 e89c93b98dac15ee99c8690eb08c80eeed3bfad1 111384 libmatio-doc_1.3.3-7_all.deb
 cc97398cf7969189bade3cf791a3db434b58b27a 79492 libmatio-dev_1.3.3-7_i386.deb
 4a94ce4f55ed8be7ed410ca9104b2f9680fd0632 76074 libmatio0_1.3.3-7_i386.deb
 e3e2d2b28b52bad6e767b9415006e9e013e45639 98124 libmatio0-dbg_1.3.3-7_i386.deb
Checksums-Sha256: 
 a4e3f27f3b7c56e2b0983541bb585f7fac79ba8289f6fdb440427b37031cf6b5 1400 
libmatio_1.3.3-7.dsc
 a17dd4181560da070623596135e1bf1f273b50c753231ae89508e7999d6d0c77 3419 
libmatio_1.3.3-7.diff.gz
 7297087d5cc8e3a45499d5e7775696726492be81c5745e1507aed441a92b2ed7 111384 
libmatio-doc_1.3.3-7_all.deb
 5fb789880133f778ac524520126df29106ceaae09b432f583cd262584e0d0c9c 79492 
libmatio-dev_1.3.3-7_i386.deb
 6511dd183e8a432b6bfeeb5be60200db1e66cfb83eeca7d56f86544c30830694 76074 
libmatio0_1.3.3-7_i386.deb
 ecbf8bcb607fd2dce1bcb3722a0b7c5af0dedae2129bbb2d58068c6a106014a3 98124 
libmatio0-dbg_1.3.3-7_i386.deb
Files: 
 5a44d6d0427fe06502e6477f9ffe073b 1400 libs optional libmatio_1.3.3-7.dsc
 5181368ef90cdf6d1d0382128c3b84c6 3419 libs optional libmatio_1.3.3-7.diff.gz
 76c1328f529abf0e697ae6088746bc5b 111384 doc extra libmatio-doc_1.3.3-7_all.deb
 2a6806a9e81c7738f37fd1b23ca2bb91 79492 libdevel optional 
libmatio-dev_1.3.3-7_i386.deb
 2003944750a3f469686a704dbd3baa3a 76074 libs optional libmatio0_1.3.3-7_i386.deb
 8c6a04ea4d714aa3e00dd6a27074dece 98124 debug extra 
libmatio0-dbg_1.3.3-7_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkuOLeEACgkQiOXXM92JlhA75gCg8nx4A07TUhm3kYLxCGG9vdor
VeEAoOVXHT0gLWo434WZYfruSQ5wZ5nG
=mFiU
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to