2016-06-20 19:43:05 -04:00
2016-06-20 19:43:05 -04:00
2016-06-15 20:45:35 -04:00
2016-06-20 19:43:05 -04:00
2016-06-20 19:43:05 -04:00
2016-06-20 11:43:18 -04:00
2016-06-15 20:45:35 -04:00
2016-06-15 20:45:35 -04:00

CompressR is a set of nuget packages that help you implement compression on your MVC, and WebApi Actions

install-package CompressR.MVC5


public class HomeController : Controller
    {
        [Compress]
        public ActionResult Index()
        {
            ViewBag.Title = "Home Page";

            return View();
        }
        [Gzip]
        public ActionResult About()
        {
           

            return View();
        }
    }

install-package CompressR.WebApi


public class ValuesController : ApiController
    {
        [Compress]
        // GET api/values
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/values/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/values
        public void Post([FromBody]string value)
        {
        }

        // PUT api/values/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/values/5
        public void Delete(int id)
        {
        }
    }

Description
Make sure your MVC and WebApi Actions return compressed
Readme 1.6 MiB
Languages
C# 82.6%
HTML 9.9%
JavaScript 6.1%
CSS 1.3%