<commit_before>= sizes

A very simple gem that exposes the C *sizeof* keyword to Ruby.

This does _not_ check the memory footprint of a given Ruby object. I may implement that sometime in the future if it's
really needed, but for now this gem is only useful for checking primitive C types such as float, short, and so on.

I wrote this because I couldn't find any cross-platform way to get these sizes from within Ruby. If it exists, then
I've just reinvented the wheel, but at least I'm documenting it. :)

== Installation

  gem install sizes
  
== Usage

  require 'sizes'
  import Sizes
  sizeof(:short)
  #=> 2

The *sizeof* method can also be called as a module function:

  require 'sizes'
  Sizes.sizeof(:float)
  #=> 4
  
== More info

Arguments to the #sizeof method can be either symbols or strings, and must be one of the following supported types:

  :char
  :unsigned_char
  :signed_char
  :signed_int
  :int
  :signed_short_int
  :signed_long_int
  :long_int
  :long
  :unsigned_int
  :unsigned
  :unsigned_short_int
  :unsigned_short
  :unsigned_long_int
  :unsigned_long
  :float
  :double
  :long_double
  
As you can see, some types are represented more than once with varying names. This is purely for convenience.

If the argument does not appear in the above list, an ArgumentError will be raised.

== Note on Patches/Pull Requests
 
* Fork the project.<commit_msg>Updated readme to include C99 types<commit_after>= sizes

A very simple gem that exposes the C *sizeof* keyword to Ruby.

This does _not_ check the memory footprint of a given Ruby object. I may implement that sometime in the future if it's
really needed, but for now this gem is only useful for checking primitive C types such as float, short, and so on.

I wrote this because I couldn't find any cross-platform way to get these sizes from within Ruby. If it exists, then
I've just reinvented the wheel, but at least I'm documenting it. :)

== Installation

  gem install sizes
  
== Usage

  require 'sizes'
  import Sizes
  sizeof(:short)
  #=> 2

The *sizeof* method can also be called as a module function:

  require 'sizes'
  Sizes.sizeof(:float)
  #=> 4
  
== More info

Arguments to the #sizeof method can be either symbols or strings, and must be one of the following supported types:

  :char
  :unsigned_char
  :signed_char
  :signed_int
  :int
  :signed_short_int
  :signed_long_int
  :long_int
  :long
  :unsigned_int
  :unsigned
  :unsigned_short_int
  :unsigned_short
  :unsigned_long_int
  :unsigned_long
  :float
  :double
  :long_double
  :int8            
  :int16           
  :int32           
  :int64           
  :uint8           
  :uint16          
  :uint32          
  :uint64          
  :int_least8      
  :int_least16     
  :int_least32     
  :int_least64     
  :uint_least8     
  :uint_least16    
  :uint_least32    
  :uint_least64    
  :int_fast8       
  :int_fast16      
  :int_fast32      
  :int_fast64      
  :uint_fast8      
  :uint_fast16     
  :uint_fast32     
  :uint_fast64     
  :intptr          
  :uintptr         
  :intmax          
  :uintmax         
  :size_t, :size   
  :wchar_t, :wchar 
         
As you can see, some types are represented more than once with varying names. This is purely for convenience.

If the argument does not appear in the above list, an ArgumentError will be raised.

== Note on Patches/Pull Requests
 
* Fork the project.
{'fraction_non_alphanumeric': 0.05700852189244784, 'fraction_numerical': 0.014105201292976785, 'mean_word_length': 2.78642936596218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1394935', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1031, 'n_words': 430}