octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #39652] load fails for gzipped, headerless as


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #39652] load fails for gzipped, headerless ascii files
Date: Fri, 02 Aug 2013 14:05:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130626 Firefox/17.0 Iceweasel/17.0.7

URL:
  <http://savannah.gnu.org/bugs/?39652>

                 Summary: load fails for gzipped, headerless  ascii files
                 Project: GNU Octave
            Submitted by: andy1978
            Submitted on: Fr 02 Aug 2013 14:05:54 GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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

fn="file2.txt"
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);
fclose(fid);

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

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


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




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39652>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]