bugGNU Octave - Bugs: bug #39652, load fails for gzipped, headerless...


bug #39652: load fails for gzipped, headerless ascii files

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Fri 02 Aug 2013 02:05:54 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 05 Aug 2013 06:47:50 PM UTC, comment #3: 

I have rebased and pushed your patch:


Thanks. You might wish to pull from Savannah and get rid of your pre-rebased patch:

hg strip -r ec0fbf2f141

And from now on, you can push your own patches. :-)

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Fri 02 Aug 2013 05:50:44 PM UTC, comment #2: 

Added new patch with better written commit message.

(file #28745)

Andreas Weber <andy1978>
Project Member
Fri 02 Aug 2013 02:35:13 PM UTC, comment #1: 

Patch added,
Regards, Andy

(file #28744)

Andreas Weber <andy1978>
Project Member
Fri 02 Aug 2013 02:05:54 PM UTC, original submission:  

Since 04fb96f4bea1 the type detection of gzipped files without header fails with some data.

The reason is because looks_like_mat_ascii_file fails if it's a gzipped file.

Below my testscrit which fails always

fid = fopen (fn,"w");
fprintf(fid, "%i %i %i %i\n",639, 25, 160, 978160);
fprintf(fid, "%i %i %i %i\n",687, 25, 171, 978160);
fprintf(fid, "%i %i %i %i\n",663, 31, 173, 978161);
fprintf(fid, "%i %i %i %i\n",663, 15, 154, 978161);
fprintf(fid, "%i %i %i %i\n",655, 21, 151, 978161);

## gzip it!
fn_gz=strcat(fn, ".gz");
cmd=cstrcat("gzip ",fn," -c > ",fn_gz)

c=load("file2.txt.gz")  #fails

If you change the 4.th line from "663, 15," to "663, 16," load works. Regards Andy

Andreas Weber <andy1978>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by andy1978 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-05 jordigh StatusNone => Fixed
        Open/ClosedOpen => Closed
    2013-08-02 andy1978 Attached File- => Added NEW_wrong_gzipped_LS_MAT_ASCII_39652.patch, #28745
    2013-08-02 andy1978 Attached File- => Added wrong_gziped_LS_MAT_ASCII_detection_39652.patch, #28744

    Back to the top

    Powered by Savane 3.6