Git Product home page Git Product logo

largecollections's Introduction

What is LargeCollections?

LargeCollections is a library for .NET framework that offers a number of interfaces and types for collections that can store up to 1152921504606846976 items. In comparison many .NET standard collections are limited to about 2.1 billion items.

Currently supported collections are:

  • LargeArray
  • LargeList
  • LargeSet
  • LargeDictionary<TKey, TValue>
  • DiskCache<TKey, TValue>
  • SpatialDiskCache<long, TValue>

DiskCache<TKey, TValue> is a dictionary-like collection that allows to limit the amount of memory (RAM) in MB that will be used. Any memory requirement that exceeds this amount is automatically swapped out to disk. Additionally it offers multi-threaded operations for performance improvements.

SpatialDiskCache<long, TValue> is a DiskCache<long, TValue> that allows to create a spatial index for the contained elements that can be used for spatial queries.

Since many .NET API are designed to work with Streams the LargeWritableMemoryStream implements a thin Stream API wrapper around a LargeList. On the other side LargeReadableMemoryStream implements a thin readonly Stream API wrapper around a IReadOnlyLargeArray.

License

Copyright (c) 2022 Developer Alexander

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

SPDX-License-Identifier: MIT

largecollections's People

Contributors

developer-alexander avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

largecollections's Issues

LargeArray CopyFrom ignores count

LargeArray CopyFrom will copy the whole source array despite count being smaller than the source array length due to this line:
long bytesToCopyCount = Math.Min(currentSourceArray.LongLength - currentSourceItemIndex, currentTargetArray.LongLength - currentTargetItemIndex);

I tested with a small source array to make sure it was actually being ignored. Maybe the answer is to Math.Min the result of that line with "count - Currentcount" for bytesToCopyCount.

Question, not an issue

Alex, first of all, well done. It seems promising project.
Honestly speaking, I didn't go through the code yet but I have a quick question: any way to develop SpatialDiskCache as concurrent dictionary? I assume it is not yet.
Last, any way to get LargeCollections working under .net 4 instead of 2 only? How do I wrap it into a 4.6 net project?

Many Thks
Ciaoooo
LUCA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.