Questions tagged [random-access]

Random access is the possibility of accessing any given record in a collection in the same time in contrast to sequential access in which distant records take longer to access than nearby records. An array is an example of a random-access data structure which can be contrasted to a list which requires sequential access.

Random access is the possibility of accessing any given record in a collection in the same time in contrast to sequential access in which distant records take longer to access than nearby records. An array is an example of a random-access data structure which can be contrasted to a list which requires sequential access.

See also

345 questions
5
votes
2 answers

How to get a random acces by index on a hash map in Clojure?

I'd like to perform a number (MAX_OPERATIONS) of money transfers from one account to another. The accounts are stored as refs in a hash-map caller my-map (int account-id, double balance). The money transfer takes a "random index" from the hash map…
nuvio
  • 2,555
  • 4
  • 32
  • 58
5
votes
4 answers

random seek in 7z single file archive

Is it possible to do random access (a lot of seeks) to very huge file, compressed by 7zip? The original file is very huge (999gb xml) and I can't store it in unpacked format (i have no so much free space). So, if 7z format allows accessing to middle…
osgx
  • 90,338
  • 53
  • 357
  • 513
5
votes
3 answers

Random Access of Large Media Files on a Remote Web Server

One of our applications currently relies on mapped drives to access large media files (20-100MB) on the local network. We would like to change this to some sort of web service so that we can make it more secure and move it to a web server (not…
Jason
  • 16,739
  • 23
  • 87
  • 137
5
votes
0 answers

Does bzip2, allow random access decompression at block or stream level?

Some other questions here have been about the issue of being able to compress only a part/chunk of a large file of compressed data. Allowing some sort of "random access decompression". Bzip2 has always been among the recommendations for such a…
humanityANDpeace
  • 4,350
  • 3
  • 37
  • 63
5
votes
1 answer

Data structure that supports random access by index and key, insertion, deletion in logaritmic time with order maintained

I'm looking for the data structure that stores an ordered list of E = (K, V) elements and supports the following operations in at most O(log(N)) time where N is the number of elements. Memory usage is not a problem. E get(index) // get element by…
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
5
votes
3 answers

C++ / Fast random access skipping in a large file

I have large files, containing a small number of large datasets. Each dataset contains a name and the dataset size in bytes, allowing to skip it and go to the next dataset. I want to build an index of dataset names very quickly. An example of file…
galinette
  • 8,896
  • 2
  • 36
  • 87
5
votes
2 answers

storing images in HBASE for processing and quick access

I have a large number of image files that I need to store and process on HDFS Let's assume 2 scenarios: Images are less than 5MB Images range from 50KB to 20MB I would like to do 4 things with the images: I need to apply some function fnc() to…
sanders
  • 133
  • 1
  • 11
5
votes
4 answers

How do I do random access reads from (large) files using node.js?

Am I missing something or does node.js's standard file I/O module lack analogs of the usual file random access methods? seek() / fseek() tell() / ftell() How does one read random fixed-size records from large files in node without these?
hippietrail
  • 15,848
  • 18
  • 99
  • 158
5
votes
1 answer

Operation of RandomAccess in AbstractList.java

In java doc of RandomAccess class has written that "Marker interface used by List implementations to indicate that they support fast (generally constant time) random access. The primary purpose of this interface is to allow generic algorithms to…
Pooya
  • 4,385
  • 6
  • 45
  • 73
5
votes
3 answers

Java access to big file

I am looking for an efficient way to create a file whose size is unknown but can range from mb's to gb's and fill its content randomly. I may write first 200 bytes than jump to the end and write last 200 bytes and move to the middle and write there.…
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
4
votes
1 answer

Automatically extend file size when seeking / writing to a location on a read/write fstream

I'm working on some legacy code that uses win32 WriteFile() to write to a random location in a binary file. The offset of the write can be past the end of the file in which case WriteFile() seems to automatically extend the file size to the offset…
liwp
  • 6,746
  • 1
  • 27
  • 39
4
votes
2 answers

What is the difference between file and random access file?

what is the difference between file and random access file?
Mahendra
4
votes
5 answers

Random access to large XML files

I have a set of tools which index large XML file (MediaWiki dump files) and use those indeces for random access to the individual records stored in the file. It works very well but I'm "parsing" the XML with string functions and/or regular…
hippietrail
  • 15,848
  • 18
  • 99
  • 158
4
votes
4 answers

c++ list random access

Possible Duplicate: How to get a certain element in a list, given the position? so in python you can get an element in a list in a random access fashion.... list = [1,12,3] print(list[1]) and it prints 12.... can you do the same thing with c++…
kamikaze_pilot
  • 14,304
  • 35
  • 111
  • 171
4
votes
3 answers

C# - Random write to file - writing the second line before the first line

I am trying to write to a file using a FileStream and want to write the second line and then write the first line. I use Seek() to go back to the beginning after writing the second line and then write the first line. It replaces the second line ( or…
manojlds
  • 290,304
  • 63
  • 469
  • 417