Sponsored Content
Top Forums Programming Segfault When Parsing Delimiters In C Post 302982558 by bigearsbilly on Friday 30th of September 2016 03:53:31 AM
Old 09-30-2016
It is dead easy to read gz files if you use this:

http://http://www.zlib.net/manual.html#Utility

It works on plain files too so you don't need to worry if its gz or not.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

parsing with multible delimiters

I have data that looks like this aaa!bbb!ccc/ddd/eee It is not fixed format. I need to parse ddd into a var in order to decide if I want to process that row. If I do I need to put ccc and bbb into vars to process it. I need to do this during a while loop one record at a time. Any... (11 Replies)
Discussion started by: gillbates
11 Replies

2. Programming

gnu history library signal segfault

i am trying to use the history functions in a c++ program along with a custom signal handler for SIGINT. the prog works fine catching signals without the line: add_history(*args); but as soon as this line is added, the prog segfaults on SIGINT. does anyone have experience using gnu... (2 Replies)
Discussion started by: a1g0rithm
2 Replies

3. UNIX for Dummies Questions & Answers

[Linux] How Do I Run Until Segfault

Hello, sorry if this has been posted before but i was wondering if there is a way to run a program until a segmentation fault is found. Currently i'm using a simple shell script which runs my program 100 times, sleeps 1 second because srand(time(0)) is dependent on seconds. Is there a possible... (1 Reply)
Discussion started by: aslambilal
1 Replies

4. Solaris

Working around netscape 4.9 segfault on Solaris 8

We have a Solaris 8 server which users login to via VNC to get a desktop. On that desktop these users use Netscape Communicator 4.9 to access a very important mail account. Unfortunately Netscape has started segfaulting regularly. Does anyone have any ideas how I can try to find out what point... (1 Reply)
Discussion started by: aussieos
1 Replies

5. Programming

2 Problems: Segfault on ctrl+c and syslog() prob

1. Even if i have the handles for ctrl+c it gives off a segfault 2. syslog doesn't log LOG_ERR event with log masked specified or non specified, it logs LOG_WARNING however... #include <sys/types.h> /* include this before any other sys headers */ #include <sys/stat.h> #include <fcntl.h>... (2 Replies)
Discussion started by: james2432
2 Replies

6. Programming

id3lib SEGFAULT

Hello everyone, I'm writing a program using the id3lib unfortunately I've encountered with memory issue that cause segmentation fault. I tried to rerun and analyze the program with valgrind but it doesn't point me anywhere. I really stuck on this one. Valgrind output: ==14716== Invalid read of... (2 Replies)
Discussion started by: errb
2 Replies

7. Programming

Is Drive Valid Segfault

I have a program that allows users to specify the debug log file location and name. I have tried using the access() and stat() but they both segfault if the drive say (d:\) is invalid. Both seem to be fine if the drive exists. Could someone please point me in the direction to a function that... (1 Reply)
Discussion started by: robfwauk
1 Replies

8. Programming

segfault in pointer to string program

hello all, my question is not about How code can be rewritten, i just wanna know even though i am not using read only memory of C (i have declared str) why this function gives me segfault :wall:and the other code executes comfortably though both code uses same pointer arithmetic. ... (4 Replies)
Discussion started by: zius_oram
4 Replies

9. Programming

String array iteration causing segfault

I am populating an array of string and print it. But it going in infinite loop and causing segfault. char Name = { "yahoo", "rediff", "facebook", NULL }; main(int argc, char* argv) { int j = 0; ... (7 Replies)
Discussion started by: rupeshkp728
7 Replies

10. Shell Programming and Scripting

--Parsing out strings for repeating delimiters for everyline

Hello: I have some text output, on SunOS 5.11 platform using KSH: I am trying to parse out each string within the () for each line. I tried, as example: perl -lanF"" -e 'print "$F $F $F $F $F $F"' But for some reason, the output gets all garbled after the the first fields.... (8 Replies)
Discussion started by: gilgamesh
8 Replies
ZLIB(3) 						     Library Functions Manual							   ZLIB(3)

NAME
zlib - compression/decompression library SYNOPSIS
[see zlib.h for full description] DESCRIPTION
The zlib library is a general purpose data compression library. The code is thread safe, assuming that the standard library functions used are thread safe, such as memory allocation routines. It provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) but other algorithms may be added later with the same stream interface. Compression can be done in a single step if the buffers are large enough or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call. The library also supports reading and writing files in gzip(1) (.gz) format with an interface similar to that of stdio. The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in the case of corrupted input. All functions of the compression library are documented in the file zlib.h. The distribution source includes examples of use of the library in the files test/example.c and test/minigzip.c, as well as other examples in the examples/ directory. Changes to this version are documented in the file ChangeLog that accompanies the source. zlib is available in Java using the java.util.zip package: http://java.sun.com/developer/technicalArticles/Programming/compression/ A Perl interface to zlib, written by Paul Marquess (pmqs@cpan.org), is available at CPAN (Comprehensive Perl Archive Network) sites, including: http://search.cpan.org/~pmqs/IO-Compress-Zlib/ A Python interface to zlib, written by A.M. Kuchling (amk@magnet.com), is available in Python 1.5 and later versions: http://docs.python.org/library/zlib.html zlib is built into tcl: http://wiki.tcl.tk/4610 An experimental package to read and write files in .zip format, written on top of zlib by Gilles Vollant (info@winimage.com), is available at: http://www.winimage.com/zLibDll/minizip.html and also in the contrib/minizip directory of the main zlib source distribution. SEE ALSO
The zlib web site can be found at: http://zlib.net/ The data format used by the zlib library is described by RFC (Request for Comments) 1950 to 1952 in the files: http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) http://tools.ietf.org/html/rfc1951 (for the deflate compressed data format) http://tools.ietf.org/html/rfc1952 (for the gzip header and trailer format) Mark Nelson wrote an article about zlib for the Jan. 1997 issue of Dr. Dobb's Journal; a copy of the article is available at: http://marknelson.us/1997/01/01/zlib-engine/ REPORTING PROBLEMS
Before reporting a problem, please check the zlib web site to verify that you have the latest version of zlib; otherwise, obtain the latest version and see if the problem still exists. Please read the zlib FAQ at: http://zlib.net/zlib_faq.html before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winim- age.com). AUTHORS
Version 1.2.8 Copyright (C) 1995-2013 Jean-loup Gailly (jloup@gzip.org) and Mark Adler (madler@alumni.caltech.edu). This software is provided "as-is," without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. See the distribution directory with respect to requirements governing redistribution. The deflate format used by zlib was defined by Phil Katz. The deflate and zlib specifications were written by L. Peter Deutsch. Thanks to all the people who reported problems and suggested various improvements in zlib; who are too numerous to cite here. UNIX manual page by R. P. C. Rodgers, U.S. National Library of Medicine (rodgers@nlm.nih.gov). 28 Apr 2013 ZLIB(3)
All times are GMT -4. The time now is 10:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy