26

Re: How to save a line in binary files?

https://ru.stackoverflow.com/questions/420525

27

Re: How to save a line in binary files?

AlekseySQL wrote:

And put not so much in data reading, how many in their conversion in int, long, bool...

And in what a problem? Considered a line, transformed, processed, threw out. And storage not
High-speed performance high is hammered also.

28

Re: How to save a line in binary files?

AlekseySQL wrote:

There is a dial-up of the big text files which operations for acceleration I convert in a convenient format:  separate lines, I lay down the transformed values in fields in structures, structures I lay down in an array, and an array I write down in

Database.....

29

Re: How to save a line in binary files?

AlekseySQL wrote:

it is passed...
Here it in SQL also strains me: it is possible to select or it is row-wise, or all a hook. And it is necessary to me pieces on 10 000 records that  it was not hammered from all data sampling. Certainly, there are also pluses: fast selections, sorting, but it is not my task.

Did not understand that you strains. Select on 10 000 records. It is possible even  these groups.

30

Re: How to save a line in binary files?

Amiri wrote:

fwrite (&sizegon_nac,>>> sizeof (int) <<<, 1, pFile);
...
fread (&sizenac,>>> sizeof (int) <<<, 1, pFile);

Taking into account what the author gathers once  a file, and then only to read it (can be even on different platforms), it is how much beautiful to be fastened for changeable length int in that case?

31

Re: How to save a line in binary files?

I took Alexey's some posts and simply united them in one. And here what pattern at me in a head turns out.
[quote =] There is a dial-up of the big text files which operations for acceleration I convert in a convenient format:  separate lines, I lay down the transformed values in fields in structures, structures I lay down in an array, and an array I write down in a binary file smile
How to be with text boxes:
1. If in structure to declare a type field char [250] it will be very prodigal (not to all values such length) is necessary.
2. If in structure to declare a field std:: string the structure ceases to be POD - object and to work with it as with bit sequence it will be already impossible. Possibility of saving of the data in a file As consequence falls off.
There are savings of the text data any the nice decision in binary files?

[quote =] 1. At first 1 time to write down, then all remained times only to read.
2. ~60 csv - files.

Judging by setting is typical bigdata. At us is . One
Time we are generated also them only we read. How with them to be? All goes not from data structures
Type char [250] or string. All is a peel and on the big data has no value. And from that
What  should be received from it. Further - on technologies,
Spark (Python/Java/Scala), Hadoop (a C ++/Java/Python) and various box business products for the analysis
The data (Show-window of the data/DataMart/OLAP). In last - I not the deep expert. Start up colleagues
Links if know. But it is convinced that such products - mass. And they remarkably consult
With such tasks.
From data marts I used Qliki, but is not assured that qliki swallows 60. It is necessary to esteem about
limitations.
Probably author simply substitutes "necessary" interesting and wants  from a C ++ and given - well so it it
Personal wish. We cannot naturally prevent. Give .