<commit_before>==============================================================================
                                                                           
                                CGD.buffer                                 
                                                                           
                                                                           
                                                                           
                                                                           
  This Program is programmed by <NAME>. <EMAIL>        
  Best for Game Developement and Optimized for Game Developement.          
                                                                           
                          http://www.CGDbuffer.co.kr                           
                                                                           
==============================================================================

1. CGD::buffer̶
   - Ʈũ 󿡼 ޽ ְ ޱ  ȭ Դϴ.
     CGD::buffer ޽ ۼϱ  ȭ  Դϴ.
     ޸ ۿ ȭ  ͸  д Ҹ մϴ.
      ȭ ͸ ڰ ʿ信   뵵   ְ 
     ڽ ý Ϻη   ֽϴ.

   -  ϸ ...
     Ư ̳ Ư ũƮ ⺻ α׷  ȿ ϴ 
      ߱մϴ. 
   -  ̳  ó    ּȭ ߱մϴ.

   - ޽  ޽ и
     -> ޽ ޽     ʽϴ.
     -> ޽ ޽  ۽   ־ մϴ.
     ->  ޽ ũ⸦ ּȭ   ܼ ޽ ߰ æٰ
        ؼ   ˼  ʽϴ.

   - ּ  ȣϼ
     ٸ ÷ ȯ  ڿ  ϴ  ƴ϶ ּҴ 
     Ͱ ȣϼ  ݴϴ.
     ׸  ȣϼ  ͵鸸 ޽ ϵ մϴ.
     ̷  ȿȭ /ڿ  ߱մϴ. 

   - α׷Ӻ ޽ 
     ޽  Ư ˿  ũƮ  Ÿ  ؾ߸
     ޽ ϴ  ƴ϶  α׷Ӻϰ  ۼϰ ϴ 
     ߱մϴ.
   - ʿ信  ̳    ֽϴ.


2. CGD::buffer Ư̻
   -  ſ մϴ.(ǻ append/extract ...)
   - ſ ϴ. (C# protobuf, msgpack  κе ְ  κе ,
     C++  ſ ... )
   - ſ ۰ ϴ. (msgpack-300k~400k, protobuf-100~200k, CGD.buffer-17k~28k)
   - C++ C++11 Template Meta Programming    templateθ Ǿ
     Include ۵˴ϴ.
      ڵ    ׿ ´ ó ϸ   
     ֵ  Ÿӿ  ó ˴ϴ.  

      * ڿ(char*, wchar_t*, std::string, std::wstring) ߰  ڿ 
        ´ ó մϴ.
      *  ڿ strlen ǽð ڿ ̸ ó ʰ Compileð
         óմϴ.
      * vector<T>, list<T>, map<K,V>  ʹ ڵ   ´ 
        ó մϴ.
      * vector<T> ̳ʰ ޸𸮺簡 ϸ memcpy մϴ.

   - C++ Debug ſ پ  Check  Assert óϹǷ
      Release  κ  ʾ ſ ϴ.
   - VS2010  ϳ ε  2012 մϴ.(GCC ߰ )
   - C# Reflection 뿡  մϴ. (Hetrogenous )


3. CGD::buffer   

    ۿ ͸ ۿ   append() մϴ.
    
        C++)
             CGD::buffer bufTemp(malloc(256));
       
             bufTemp.append<uint8_t>(10);
             bufTemp.append<char>(20);
             bufTemp.append<int>(-100);
             bufTemp.append<uint32_t>(1000);
             bufTemp.append<std::string>("Test String"); // ڿ 
       
        C#) 
             CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
       
             bufTemp.append<byte>(10);
             bufTemp.append<sbyte>(20);
             bufTemp.append<int>(-100);
             bufTemp.append<uint>(1000);
             bufTemp.append<string>("Test String");	// ڿ 


    ̷ ۼ ޽ extract()  о  ֽϴ.

         C++)
             auto temp1 = bufTemp.extract<uint8_t>();
             auto temp2 = bufTemp.extract<char>();
             auto temp3 = bufTemp.extract<int>();
             auto temp4 = bufTemp.extract<uint32_t>();
             auto temp5 = bufTemp.extract<std::string>();
   	     
         C#) 
             var temp1 = bufTemp.extract<byte>();
             var temp2 = bufTemp.extract<SByte>();
             var temp3 = bufTemp.extract<int>();
             var temp4 = bufTemp.extract<uint>();
             var temp5 = bufTemp.extract<string>();
	     

     ͵ ϸ   ͵  ٰ մϴ.
     C# List<T>, Dictionary<K,V> ...
     C++ vector<T>, list<T>, set<T>, map<T> ....

        C++)
            vector<int>                  listTest = { ...};
            list<std::string>            listStringTest = { ...};
            map<std::string, int>        mapTemp = { ...};
            map<int, list<std::string>>  maplistTemp = { ...};
	    
            CGD::buffer bufTemp(malloc(256));
	    
            bufTemp.append<vector<int>>(listTest);
            bufTemp.append<list<std::string>>(listStringTest);
            bufTemp.append<map<std::string, int>>(mapTemp);
            bufTemp.append<map<int, list<std::string>>>(maplistTemp);
	    
            .................
	    
            auto temp1 = bufTemp.extract<vector<int>>();
            auto temp2 = bufTemp.extract<list<std::string>>();
            auto temp3 = bufTemp.extract<map<int, std::string>>();
            auto temp4 = bufTemp.extract<map<int, list<std::string>>>();

   
        C#) 
            List<int>                      listTest = new ...;
            List<string>                   listStringTest = new ...;
            Dictionary<string, int>        dicTest = new ...;
            Dictionary<int, List<string>>  dicListTest = new ...;
       
            CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
       
            bufTemp.append<List<int>> (listTest);
            bufTemp.append<List<string>> (listStringTest);
            bufTemp.append<Dictionary<string,int>> (dicTest);
            bufTemp.append<Dictionary<string,List<int>>> (dicListTest);
       
            .................
       
            var temp1 = bufTemp.extract<List<int>> ();
            var temp2 = bufTemp.extract<List<string>> ();
            var temp3 = bufTemp.extract<Dictionary<string,int>> ();
            var temp4 = bufTemp.extract<Dictionary<string,List<int>>> ();


    C#  ü ؼ   մϴ.
    (C++  tuple  Ҽ ϳ ...)

        C#) 
            struct TEST
            {
	            public int       x;
                public float     y;
                public string    z;
                public List<int> w;
            };
	    
            struct TEST2
            {
                public int       a;
                public List<int> b;
                public TEST      c;
            };
	    
     TEST2  ̰ ٰ ü ó մϴ.

        C#) 
            TEST2  tempData;
	    
            CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
	    
            bufTemp.append<TEST2>(tempData);
	    
            .................
	    
            var temp1 = bufTemp.extract<TEST2>();

    )  C++ struct primitive  ϱ  ƹ ٸ
          ۾ ο string̳ vector<T>, list<T>   ʽϴ.


4. Ÿ   
   - CGD::buffer C++ Դϴ.
   - CGD.buffer CGD::bufer C#Դϴ.
   - CGD.buffer CGD::buffer ۼ ޽ ȣ ȣȯ  Ϻ 
      ʴ ͵  Ͽ Ͻñ ٶϴ.
     ( C# struct  C++ ٸϴ.)

   - C++ C# ֿ ̴ Ʒ ϴ.
      -------------------------------------------
                      (C++)             (C#)
      -------------------------------------------
      buffer Ŭ  CGD::buffer     CGD.buffer
      ptr Ŭ     CGD::ptr            x
      տ ̱    prepend(...)        x
      ڿ ̱    append(...)     append(...)
      տ   extract(...)    extract(...)
      ڿ   subtract(...)       x
      -------------------------------------------
      _ڿ        o               x
                   o               o
      ٰ             o               o
      Hetro-type         *(tuple)        O
      string(USC)        o               x
      string(UTF-8)      o               o
      string(UTF-16)     o               x
      string(UTF-32)     o               x
      PoolҴ       o(CGPoolʿ)   o(CGPoolʿ)
      Bounding Check     o               o
      DateTime       o               o
      initializer_list   o               x
      -------------------------------------------


5.   䱸
   @ http://www.cgdbuffer.co.kr
   @ http://www.cgcii.co.kr
   @ <EMAIL>
<commit_msg>modify comment again<commit_after>==============================================================================
                                                                           
                                CGD.buffer                                 
                                                                           
                                                                           
                                                                           
                                                                           
  This Program is programmed by <NAME>. <EMAIL>        
  Best for Game Developement and Optimized for Game Developement.          
                                                                           
                          http://www.CGDbuffer.co.kr                           
                                                                           
==============================================================================

1. CGD::buffer̶
   - Ʈũ 󿡼 ޽ ְ ޱ  ȭ Դϴ.
     CGD::buffer ޽ ۼϱ  ȭ  Դϴ.
     ޸ ۿ ȭ  ͸  д Ҹ մϴ.
      ȭ ͸ ڰ ʿ信   뵵   ְ 
     ڽ ý Ϻη   ֽϴ.

   -  ϸ ...
     Ư ̳ Ư ũƮ ⺻ α׷  ȿ ϴ 
      ߱մϴ. 
   -  ̳  ó    ּȭ ߱մϴ.

   - ޽  ޽ и
     -> ޽ ޽     ʽϴ.
     -> ޽ ޽  ۽   ־ մϴ.
     ->  ޽ ũ⸦ ּȭ   ܼ ޽ ߰ æٰ
        ؼ   ˼  ʽϴ.

   - ּ  ȣϼ
     ٸ ÷ ȯ  ڿ  ϴ  ƴ϶ ּҴ 
     Ͱ ȣϼ  ݴϴ.
     ׸  ȣϼ  ͵鸸 ޽ ϵ մϴ.
     ̷  ȿȭ /ڿ  ߱մϴ. 

   - α׷Ӻ ޽ 
     ޽  Ư ˿  ũƮ  Ÿ  ؾ߸
     ޽ ϴ  ƴ϶  α׷Ӻϰ  ۼϰ ϴ 
     ߱մϴ.
   - ʿ信  ̳    ֽϴ.


2. CGD::buffer Ư̻
   -  ſ մϴ.(ǻ append/extract ...)
   - ſ ϴ. (C# protobuf, msgpack  κе ְ  κе ,
     C++  ſ ... )
   - ſ ۰ ϴ. (msgpack-300k~400k, protobuf-100~200k, CGD.buffer-17k~28k)
   - C++ C++11 Template Meta Programming    templateθ Ǿ
     Include ۵˴ϴ.
      ڵ    ׿ ´ ó ϸ   
     ֵ  Ÿӿ  ó ˴ϴ.  

      * ڿ(char*, wchar_t*, std::string, std::wstring) ߰  ڿ 
        ´ ó մϴ.
      *  ڿ strlen ǽð ڿ ̸ ó ʰ Compileð
         óմϴ.
      * vector<T>, list<T>, map<K,V>  ʹ ڵ   ´ 
        ó մϴ.
      * vector<T> ̳ʰ ޸𸮺簡 ϸ memcpy մϴ.

   - C++ Debug ſ پ  Check  Assert óϹǷ
      Release  κ  ʾ ſ ϴ.
   - VS2010  ϳ ε  2012 մϴ.(GCC ߰ )
   - C# Reflection 뿡  մϴ. (Hetrogenous )


3. CGD::buffer   

    ۿ ͸ ۿ   append() մϴ.
    
        C++)
             CGD::buffer bufTemp(malloc(256));
       
             bufTemp.append<uint8_t>(10);
             bufTemp.append<char>(20);
             bufTemp.append<int>(-100);
             bufTemp.append<uint32_t>(1000);
             bufTemp.append<std::string>("Test String"); // ڿ 
       
        C#) 
             CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
       
             bufTemp.append<byte>(10);
             bufTemp.append<sbyte>(20);
             bufTemp.append<int>(-100);
             bufTemp.append<uint>(1000);
             bufTemp.append<string>("Test String");	// ڿ 


    ̷ ۼ ޽ extract()  о  ֽϴ.

         C++)
             auto temp1 = bufTemp.extract<uint8_t>();
             auto temp2 = bufTemp.extract<char>();
             auto temp3 = bufTemp.extract<int>();
             auto temp4 = bufTemp.extract<uint32_t>();
             auto temp5 = bufTemp.extract<std::string>();
   	     
         C#) 
             var temp1 = bufTemp.extract<byte>();
             var temp2 = bufTemp.extract<SByte>();
             var temp3 = bufTemp.extract<int>();
             var temp4 = bufTemp.extract<uint>();
             var temp5 = bufTemp.extract<string>();
	     

     ͵ ϸ   ͵  ٰ մϴ.
     C# List<T>, Dictionary<K,V> ...
     C++ vector<T>, list<T>, set<T>, map<T> ....

        C++)
            vector<int>                  listTest = { ...};
            list<std::string>            listStringTest = { ...};
            map<std::string, int>        mapTemp = { ...};
            map<int, list<std::string>>  maplistTemp = { ...};
	    
            CGD::buffer bufTemp(malloc(256));
	    
            bufTemp.append<vector<int>>(listTest);
            bufTemp.append<list<std::string>>(listStringTest);
            bufTemp.append<map<std::string, int>>(mapTemp);
            bufTemp.append<map<int, list<std::string>>>(maplistTemp);
	    
            .................
	    
            auto temp1 = bufTemp.extract<vector<int>>();
            auto temp2 = bufTemp.extract<list<std::string>>();
            auto temp3 = bufTemp.extract<map<int, std::string>>();
            auto temp4 = bufTemp.extract<map<int, list<std::string>>>();

   
        C#) 
            List<int>                      listTest = new ...;
            List<string>                   listStringTest = new ...;
            Dictionary<string, int>        dicTest = new ...;
            Dictionary<int, List<string>>  dicListTest = new ...;
       
            CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
       
            bufTemp.append<List<int>> (listTest);
            bufTemp.append<List<string>> (listStringTest);
            bufTemp.append<Dictionary<string,int>> (dicTest);
            bufTemp.append<Dictionary<string,List<int>>> (dicListTest);
       
            .................
       
            var temp1 = bufTemp.extract<List<int>> ();
            var temp2 = bufTemp.extract<List<string>> ();
            var temp3 = bufTemp.extract<Dictionary<string,int>> ();
            var temp4 = bufTemp.extract<Dictionary<string,List<int>>> ();

    *) append <T>   ʿ ϴ.
       appendϸ ׳  ڷ   ߰  ڵ ü 
       ֱ    ݴϴ.

        C++)
            vector<int>                  listTest = { ...};
            list<std::string>            listStringTest = { ...};
            map<std::string, int>        mapTemp = { ...};
            map<int, list<std::string>>  maplistTemp = { ...};
	    
            CGD::buffer bufTemp(malloc(256));
	    
            bufTemp.append(listTest);
            bufTemp.append(listStringTest);
            bufTemp.append(mapTemp);
            bufTemp.append(maplistTemp);
	    
        C#) 
            List<int>                      listTest = new ...;
            List<string>                   listStringTest = new ...;
            Dictionary<string, int>        dicTest = new ...;
            Dictionary<int, List<string>>  dicListTest = new ...;
       
            CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
       
            bufTemp.append(listTest);
            bufTemp.append(listStringTest);
            bufTemp.append(dicTest);
            bufTemp.append(dicListTest);
       
	extract<T> <T>  ϸ c++  decltype 
           ֽϴ.
        C#  GetType()̳ typeof()  Type
        extract մϴ.



    C#  ü ؼ   մϴ.
    (C++  tuple  Ҽ ϳ ...)

        C#) 
            struct TEST
            {
	            public int       x;
                public float     y;
                public string    z;
                public List<int> w;
            };
	    
            struct TEST2
            {
                public int       a;
                public List<int> b;
                public TEST      c;
            };
	    
     TEST2  ̰ ٰ ü ó մϴ.

        C#) 
            TEST2  tempData;
	    
            CGD.buffer bufTemp = new CGD.buffer(new byte[256]);
	    
            bufTemp.append<TEST2>(tempData);
	    
            .................
	    
            var temp1 = bufTemp.extract<TEST2>();

    )  C++ struct primitive  ϱ  ƹ ٸ
          ۾ ο string̳ vector<T>, list<T>   ʽϴ.


4. Ÿ   
   - CGD::buffer C++ Դϴ.
   - CGD.buffer CGD::bufer C#Դϴ.
   - CGD.buffer CGD::buffer ۼ ޽ ȣ ȣȯ  Ϻ 
      ʴ ͵  Ͽ Ͻñ ٶϴ.
     ( C# struct  C++ ٸϴ.)

   - C++ C# ֿ ̴ Ʒ ϴ.
      -------------------------------------------
                      (C++)             (C#)
      -------------------------------------------
      buffer Ŭ  CGD::buffer     CGD.buffer
      ptr Ŭ     CGD::ptr            x
      տ ̱    prepend(...)        x
      ڿ ̱    append(...)     append(...)
      տ   extract(...)    extract(...)
      ڿ   subtract(...)       x
      -------------------------------------------
      _ڿ        o               x
                   o               o
      ٰ             o               o
      Hetro-type         *(tuple)        O
      string(USC)        o               x
      string(UTF-8)      o               o
      string(UTF-16)     o               x
      string(UTF-32)     o               x
      PoolҴ       o(CGPoolʿ)   o(CGPoolʿ)
      Bounding Check     o               o
      DateTime       o               o
      initializer_list   o               x
      -------------------------------------------


5.   䱸
   @ http://www.cgdbuffer.co.kr
   @ http://www.cgcii.co.kr
   @ <EMAIL>

{'fraction_non_alphanumeric': 0.16660351143109764, 'fraction_numerical': 0.013641530882910194, 'mean_word_length': 0.9429447852760736, 'pattern_counts': {'":': 0, '<': 186, '<?xml version=': 0, '>': 192, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 58, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4382955', 'n_tokens_mistral': 5523, 'n_tokens_neox': 5296, 'n_words': 1133}