================================================================================
                                PROMPTSQUEEZE
           Tokenization Alignment & Whitespace-to-Byte Optimization Engine
                   Developed by OmniOrigin Group of Businesses
================================================================================

Software Name    : PromptSqueeze
Author / Owner   : Jagjit Singh (OmniOrigin Group of Businesses)
Website          : https://promptsqueeze.omniorigin.in
License Type     : Source-Available Core Engine & Proprietary Paid Add-ons
Effective Date   : August 04, 2026

--------------------------------------------------------------------------------
1. ABOUT PROMPTSQUEEZE
--------------------------------------------------------------------------------
PromptSqueeze is a lightweight, high-performance optimization engine built to 
drastically reduce LLM (Large Language Model) token consumption and lower API 
costs (OpenAI, Anthropic, Gemini, Llama, etc.).

By stripping non-essential formatting noise, structural redundancy, and optimizing 
raw string representations before sending requests to AI models, PromptSqueeze 
helps developers save up to 25%–50% in token overhead without degrading LLM 
reasoning accuracy.

--------------------------------------------------------------------------------
2. HOW PROMPTSQUEEZE WORKS (CORE ARCHITECTURE)
--------------------------------------------------------------------------------
PromptSqueeze works as an intermediary optimization pipeline between your application 
inputs and AI API payloads:

+-------------------+     +-------------------------+     +-------------------+
|  Raw User Input / | --> |  PROMPTSQUEEZE ENGINE   | --> |  Optimized Payload|
|  Large Prompt     |     |  (Compression & Hooks)  |     |  To LLM Provider  |
+-------------------+     +-------------------------+     +-------------------+

Workflow Steps:
[Step 1] Input Capture:
         The core engine (`squeeze.php`) accepts raw text, JSON payloads, or 
         system prompts via HTTP POST or internal PHP execution.

[Step 2] Core Whitespace & Formatting Compression:
         The free Core Engine normalizes double spaces, unnecessary newlines, 
         trailing whitespaces, and standard redundant string markers.

[Step 3] Add-on Hook Execution Pipeline:
         If active paid Add-ons are loaded (e.g., Tokenization Alignment & 
         Whitespace-to-Byte Encoding), the core engine passes the squeezed 
         stream through proprietary bytecode processing routines:
         - Tokenization Alignment: Restructures structural markers so the 
           LLM tokenizer groups multiple characters into single tokens.
         - Whitespace-to-Byte Encoding: Converts multi-character structural 
           spacing into single byte-level character representations.

[Step 4] Delivery & Dashboard Telemetry:
         The compressed payload is returned to your API caller, and execution 
         metrics (original token count vs squeezed token count) are logged in 
         the local `dashboard.php` interface.

--------------------------------------------------------------------------------
3. REPOSITORY FILE STRUCTURE
--------------------------------------------------------------------------------
promptsqueeze/
│
├── squeeze.php          # Main execution engine & compression interface
├── dashboard.php        # Web UI dashboard for token metrics & logs
├── php-installer.php    # Automated setup script for web servers
├── license.txt            # Official License & Legal Terms Page
├── Readme.txt           # Product Documentation & Setup Guide (This File)
│
└── addons/              # Directory for domain-locked proprietary Add-ons
    └── [your-paid-addon-modules]/

--------------------------------------------------------------------------------
4. INSTALLATION & QUICK START GUIDE
--------------------------------------------------------------------------------
Prerequisites:
- PHP 7.4 or higher (PHP 8.x recommended)
- cURL extension enabled
- Write permission for log directories (if dashboard logging is enabled)

Quick Setup:
1. Upload all core files (`squeeze.php`, `dashboard.php`, `php-installer.php`, etc.) 
   to your web server directory (e.g., `public_html/promptsqueeze/`).

2. Access `http://your-domain.com/promptsqueeze/php-installer.php` in your 
   browser to run the quick configuration check.

3. Testing Compression via PHP:
   <?php
   require_once 'squeeze.php';
   
   $raw_prompt = "Your long prompt text goes here...";
   $squeezed_prompt = PromptSqueeze::compress($raw_prompt);
   
   echo $squeezed_prompt;
   ?>

4. Access `http://your-domain.com/promptsqueeze/dashboard.php` to monitor 
   token savings and system usage.

--------------------------------------------------------------------------------
5. FREE CORE vs PAID ADD-ONS BREAKDOWN
--------------------------------------------------------------------------------
[CORE ENGINE - FREE & SOURCE-AVAILABLE]
- Includes `squeeze.php`, `dashboard.php`, `php-installer.php`.
- Basic whitespace normalization & token trimming.
- Local performance tracking dashboard.
- Permitted for personal and internal commercial usage.

[PROPRIETARY ADD-ONS - PAID & DOMAIN-LOCKED]
- Includes Tokenization Alignment & Whitespace-to-Byte Encoding.
- Deep BPE (Byte Pair Encoding) alignment optimization.
- Domain-locked packages purchased via central marketplace.
- Requires authorized domain key activation.

--------------------------------------------------------------------------------
6. LICENSE & RESTRICTIONS (SUMMARY)
--------------------------------------------------------------------------------
PromptSqueeze is protected by Intellectual Property laws and governed by the 
Official PromptSqueeze Source-Available License Agreement.

[PERMITTED]:
- You may use, inspect, and execute the Core Engine for personal or commercial apps.
- You may integrate `squeeze.php` into your custom backend workflows.

[STRICTLY PROHIBITED]:
- YOU SHALL NOT re-brand, white-label, create derivative works, or modify the 
  core engine to re-sell or launch a competing standalone product/service.
- YOU SHALL NOT re-distribute, resell, share, or leak paid Add-on ZIP packages.
- YOU SHALL NOT decompile, decrypt, or attempt to bypass domain-locking security 
  mechanisms built into paid extensions.

Full legal agreement available at: `terms.php` or `https://promptsqueeze.omniorigin.in/terms.php`

--------------------------------------------------------------------------------
7. SUPPORT & INQUIRIES
--------------------------------------------------------------------------------
Owner / Developer : Jagjit Singh
Organization      : OmniOrigin Group of Businesses
Official Website  : https://promptsqueeze.omniorigin.in
Support Email     : support@omniorigin.in

================================================================================
        (c) 2026 PromptSqueeze — OmniOrigin Group of Businesses. All Rights Reserved.
================================================================================