CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Philidor

Page 1 of 3 1 2 3

Search: Search took 0.16 seconds.

  1. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Changing to what you suggested works this time, even when some messages appeared in debugger but the file was processed.
    And testing with 2GB file with the exe program you attached works just fine...
  2. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello Paul,

    I run with debugger and appear this file refering the error to line 142 (in red):

    /***
    *xtoa.c - convert integers/longs to ASCII string
    *
    * Copyright (c) Microsoft...
  3. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Many thanks for all the help in this case. Of course I need to understand it to be able to do some change, I don't want to
    bother you anymore, too much help so far:)

    I'll see how...
  4. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    With the previous code before last changes I didn't detected incorrect output for 2GB file.

    Regarding the issue of segmentation fault I get, is as follow.
    I have 2 types of files...
  5. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you for your help. I've tested the last main function and it seems to print the correct output and is handling the issue mentioned in previous post. Besides that it seems to be...
  6. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you, is very close now the output, only I found that in attached file (bin1MB.txt) some blocks, beginning in block number 9128 (0023A8 in hex) is printing not the correct...
  7. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you. I haven't tested yet, only would like to understand better.

    For example, what 2nd y 3rd array you define are for? And why in 2nd array you define some elements with...
  8. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello again,

    I've tried your last code in CodeBlocks with GNU GCC and the compilation works, but I've tested in Visual Studio 2013 and I receive error in compilation with _itoa() saying "itoa() is...
  9. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Sorry 2kaud.

    Yes, each substring that begins with 9X only appears once, in any order and only once. and the substring 940EX... always appears at the end if at least there is one substring.
  10. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    I undertand that could be more complicate print in that order. I don't know how to put in code or change your code to do that, but my idea is something have an array A[90]=4, A[91]=5, etc. And and...
  11. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    When they appear (90, 91, 9A, 92, 93, 9B, 96, 97), can occur in any order, but always the substring 94X.... is at the end.
  12. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thanks! I've tried and it seems to work just fine, but I'll continue trying because with one small file I got segmentation fault
    and only prints the first line, I need to check that...
  13. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    I've tested your last code and it works, it extracts all substrings expected.

    I found that each substring that begins with 9X... could take 2 more values.

    9X, where...
  14. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Yes 2kaud. If is not present the complete conditions, then the string doesn't qualify to be a sub-block.

    It should contain 059X +.. +940E+14 bytes
  15. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    The thing is that not always appear all subtrings, sometimes could appear only 91XXXXX or 90XXXX and 93XXXXXX. Then, could appear one or more substrings in each subblock.

    With the...
  16. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thanks for the great help!

    It getting the strings but is getting other strings too. For the first 4 blocks it seems to get the correct strings, but for the laststring shouln't get...
  17. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    You're rigth 2kaud, that file has 9 bytes in first part. That is an error in that file. But the correct thing is 2 strings of 8 bytes.

    The last sample file is correct in that way and will be...
  18. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Attached a small zipped file that contains the patterns mentioned. Contains correlative FF79 and begin of sub-block FF79 too.

    Best regards
  19. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Yes, I see for that file instead of FF79 is FF34. For that file the begin of sub-block is FF74 and each substring begins with 8X (where X=0,1,2,3,6,7), and instead of "05" is "03"....
  20. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Certainly there a block number FF79, but this correlative shouln't be confused with the FF79 that says when begins a new sub-block within each block. So, once processed the first 2...
  21. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Yes, the "f's" are used to fill the substrings when the 16 bytes are not completely occupied by numbers (0 to 9), then the "f's" appear always from rigth to left of each substring and...
  22. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you for the answer and yes, it seems to work a little faster with pre-set block size.

    Now I'll try to explain what are the conditions to get the other substrings from each...
  23. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you!

    I've tested and this time the block number 65399 (00FF77 in hex) is printing completely too.

    The complete file, printing block number, size, blk and first 32...
  24. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello Paul,

    Yes, is within the file. This is the small piece of file in text format where this occured.
    The file doesn't have inconsistencies, only happens that the 3 bytes after the delimiter...
  25. Replies
    155
    Views
    69,891

    Re: Read binary file with line delimeter

    Hello 2kaud,

    Thank you. I've been doing some tests and it processed all file of 2GB in 4 min! (without regex function).

    But I've found an issue, in block 65399 (65399 = 00FF77 in hex = block...
Results 1 to 25 of 63
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured